Shame and guilt are two sides of a coin. Indeed, they are acknowledgements of wrongdoing but they aren’t the same.
Shame, on one hand, is acknowledging we have violated a social code. We have done or are part of something that’s socially unacceptable or taboo in social circles of which we are a part.
Guilt, on the other hand, is the acknowledgment of a violation of one’s internal constitution.
The former tells you about your environment and the latter tell you about yourself.