The primary method is by building a society in which people, predominantly, have something to lose by doing so. The social contract is not some optional lofty ideal.
> If there is righteousness in the heart, there will be beauty in the character. If there is beauty in the character, there will be harmony in the home. If there is harmony in the home, there will be order in the nations. When there is order in the nations, there will peace in the world.
- Confucious
(and we definitely need to do that)