Greatest happiness principle
The greatest happiness principle is a foundation for utilitarianism. Utilitarianism is a theory of morality which says actions are moral if they promote utility. Utility, in case of the greatest happiness principle, is defined as happiness and absence of pain which is thought to be measurable in terms of brain activity.
Utilitarianism requires people to be convinced by an argument that cooperation is a useful goal at all and that it is useful to enable everyone to be as happy as possible. Such an argument could be that making everyone happy reduces the chance of conflict and makes the world a more pleasurable place to be in, enabling us to travel with little fear of danger, maximizing social trust. Shaming and the resulting virtue signaling can help enforcing everyone to accept this goal, but such shaming bears the danger that people get fed up with it.