So, you need to resort to locking yourself out now? It is safe to install a hasp type lock on the front jamb, or between the door and the top surface of a fridge. Heat exchange coils are generally along the inside wall and back wall of the units, but you can look up information specfic to your appliance if you know the model number. Most refrigerators are manufactured with sheet metal covered in powder coatings or stainless. You won't need a long screw, keep it to less than 1/4" beyond the thickness of the lock.
There are locks manufactured for keeping children out of refrigerators. Do a Google search on refrigerator lock.