Security blanket

Something that one holds onto for reassurance or comfort (like a child and a blanket).

The boy uses his computer as a security blanket so that he does not have to meet new people.