Although there is some overlap, embarrassment, shame, and guilt are distinct constructs.
Let's look at each of them in turn.
Embarrassment is the feeling of discomfort when  some aspect of ourselves is, or threatens to be, revealed to others, and  we think that this revelation is likely to undermine the image that we seek to project to those others.
Potential sources of embarrassment vary according to circumstances and, in particular, to the company in which we find ourselves. They include particular thoughts, feelings, or dispositions; actions or behaviors, such as farting or swearing; conditions or states, such as a spot on the nose or smelly feet; possessions, such as our car or home; and relations, such as our oafish partner, criminal uncle, or lecherous aunt.
Sources of embarrassment need not be beneath our projected image, but merely out of keeping with it—which explains why it is possible, at times, to be embarrassed by our posh parents or rarefied education.
Whereas embarrassment is a response to something that threatens our projected image but is otherwise morally neutral, shame is a response to something that is morally reprehensible.
Shame is often accentuated if its object is exposed, but, unlike embarrassment, also attaches to a thought or action that remains undisclosed and undiscoverable to others. Embarrassment can sometimes be intense, but shame is a more substantial feeling in that it pertains to our moral character and not merely to our social character or image.
Shame arises from measuring our actions against moral standards and discovering that they fall short. If our actions fall short and we fail to notice, we can "be shamed" or made to notice—an extreme example being Cersei Lannister’s Walk of Shame in Game of Thrones. If having been made to notice, we do not much mind, we can be said to be shameless, or to "have no shame."
In the Rhetoric, Aristotle, ever the fine psychologist, remarks that shame also arises from lacking in honorable things shared by others like us, especially if the lack is our own fault and therefore owes in some sense to our moral badness.
Finally, it is possible to feel shame vicariously—that is, to share in the shame of another person or feel shame on his or her behalf, especially if this person is closely allied or associated with us: for example, our partner, sibling, or child. Thus, even blameless people can experience shame, and this is also true of embarrassment and other emotions. "Hell," said Jean-Paul Sartre, "is other people."
Try, right now, to act out the feeling of shame. The word "shame" derives from the Proto-Indo-European for "to cover," and the feeling of shame is often expressed by a covering gesture over the brow and eyes, a downcast gaze, and a slack posture. Other manifestations of shame include a sense of warmth or heat and mental confusion or paralysis. These signs and symptoms can communicate remorse and contrition and, in so doing, inspire pity and pardon.
Even so, we may prefer to make a secret of our shame, for shame can itself be shameful—or, to be more precise, embarrassing.
People with low self-esteem, being harsher upon themselves, are more given to shame. In some cases, they may defend against shame with blame or contempt, often for the person or people who incited their shame. This is only likely to lead to deeper shame, and therefore to lower self-esteem, opening up a vicious cycle—which might be broken if, like certain politicians, they stop feeling shame at all.
While overwhelming shame can be destructive, mild to moderate shame is mostly a force for good, goading us to live more ethical lives.
In Dying for Ideas, the philosopher Costica Bradatan writes:
...the chief reason for studying philosophy is not a desire to know more about the world, but a profound sense of dissatisfaction with the state in which one finds oneself. One day you suddenly, painfully, realize that something important is missing in your life and that there is too large a gap between what you are and the sense of what you should be. And before you know it, this emptiness starts eating at you. You may not know yet what exactly it is that you want, but you know quite well what you do not want: remaining the person you currently are. You may be so ashamed that you don’t even dare to call that "existence": you don’t exist yet properly. It must have been in this sense that Socrates used the term "midwifery" for what he was doing. By subjecting those around him to the rigors of philosophy, he was bringing them into proper existence. So closely related to self-detestation, it may be that philosophy begins not in wonder, but in shame.
Whereas shame pertains to a person, guilt pertains to an action or actions and to blame and remorse. Shame says, “I am bad.” Guilt says, “I did something bad.”
More subtly, shame involves falling short of cultural or societal moral standards, whereas guilt involves falling short of one’s own moral standards. Thus, it is entirely possible to feel guilty about actions of which many or most of our peers approve, such as wearing designer clothes, driving a gas-guzzling car, or eating red meat.
Shame and guilt often go hand in hand, which is why they are so often confused. For instance, when we injure someone, we often feel bad about having done so (guilt) and, at the same time, feel bad about ourselves (shame).
But as I discuss in my new book, Heaven and Hell: The Psychology of the Emotions, shame and guilt are very different emotions. Shame is "egodystonic," or in conflict with our desired self-image, and high levels of shame are correlated with poor psychological functioning. In particular, eating disorders and many sexual disorders can be understood as disorders of shame, as can narcissism, which can be construed as a defense against shame.
Guilt, on the other hand, is "egosyntonic," or consistent with our self-image, and—except in extreme cases, such as that of the regicidal Lady Macbeth—is either unrelated or inversely correlated with poor psychological functioning.
Faced with the same set of circumstances, people with high self-esteem are more prone to guilt than to shame, and more likely to take corrective or redemptive action.
See my related article on humiliation here.
Aristotle, Rhetoric, Bk 2 Ch 6.
JP Sartre (1944), No Exit, Act I Sc. 5.
C Bradatan (2015), Dying for Ideas: The Dangerous Lives of Philosophers.