Shame and guilt are really two sides of the same medal, aren't they? As in: guilt is evolutionary internalised avoidance of shame.
And, yes, it's an extremely strong mechanism. Most emotions are basically evolutionary implementations of government: shame -> criminal law, pity -> social safety net, etc.
Shaming is getting a bad rep these days, but it's essentially the least invasive method a society has to enforce common standards of decency.