emergency friends
When you aren't friends with anyone in a new place (class, gym, work, church, etc.) but you know you're going to need friends for that place, you become emergency friends.
I was in gym class with all of the dumb kids so I had to become emergency friends with some girl only because she was the least annoying person there.

I wasn't friends with anyone in physics class and I made emergency friends with the guy next to me so I'd have someone to sit with at lunch.