Guilt as emotion is a derivative of fear and, like him, feels like the factor of socialization. It appears after performing a behavior that the culture considers inappropriate.
The consequences of the fault are of two categories:
Those that generate fear of being loved and those that generate fear of punishment
On the other hand, shame also feels like fear but appears before performing the socialized behavior with this emotion. The fear that is felt under the feeling of shame is related to the loss of one's own image. So for people who are socialized with shame, the world is full of eyes that see everything and their main fear is "the one they will say".
But not everything is bad in these emotions, guilt, that is to say, fear of the loss of love of others as well as fear of punishment, makes human groups control their antisocial impulses and make group tasks possible.
When there is no guilt or shame we are in the presence of what is usually called psychopath or sociopath. Healthy and well-integrated people maintain an appropriate level between their own "I" and "I" of others balanced their guilt and shame.