You stated that the car overheated and you shut it off immediately, which is a good idea. The problem is that the head gasket failure more than likely lead to the overheating in the first place. The gasket(s) fail, coolant leaks, then the car can overheat. Also, you said that it was only for 5 minutes, but heat builds and disapates with time, so the event may have appeared only to be 5 minutes but it takes longer for the heat to go down. So it really sounds like your car overheated due to a head gasket failure, and the coolant they had in the shop was from them attempting to check the condition.
I know this well because the same thing happened to me with a 1994 Mustang I had, so I have been in your position.