retreat into (one's) shell
1. To retreat into one's mind or otherwise isolate oneself so as to avoid undesirable thoughts, situations, or interactions with people. After getting mugged I retreated into my shell and didn't speak to anyone for nearly a week. I'm not good around large groups of people. I usually just retreat into my shell and wait until I can be alone. Don't retreat into your shell because you don't want an argument—talk to me and let's discuss the problem!
2. To act in a reserved and/or defensive manner. The team retreated into their shells after halftime, trying to protect a slim lead. The senator retreated into his shell when reporters tried to question him about allegations of tax fraud.