Guilt is about the act: you feel guilt because you did something wrong. Shame is about the self: you feel shame because of what that act says about who you are. You can feel guilty for forgetting a friend's birthday without feeling any shame about it at all.
The core difference
Guilt is a troubled feeling about a specific wrong you did; shame is a painful feeling about yourself caused by that wrong.
- shame — a painful feeling of embarrassment tied to your sense of self: He felt a deep shame after lying to his parents.
- guilt — a troubled feeling about having done something wrong: She felt guilt for forgetting her friend's birthday.
How to tell them apart
A useful test: guilt says "I did a bad thing"; shame says "I am bad." Guilt tends to stay focused on the action, which is one reason it can push people to apologise or make amends. Shame sits closer to identity, which is why it can make people want to hide rather than fix anything.
The words also work as verbs with a similar split. To shame someone is to publicly criticise them, aimed at their standing in front of others. To guilt someone is to pressure them by working on their conscience, aimed at getting them to act.