You can put a refrigerator in an unheated garage although the fridge may not operate correctly and kick the compressor on when the temperature gets too cold.
However if the garage is cold enough then the food will likely remain cold in the refrigerator even when the fridge does not come on.
If leaving on vacation and you have no food in the refrigerator you can unplug it to save electricity.
You should unplug your refrigerator if away for 1 month or longer.
Removing all the food and unplugging the fridge will also save electricity and you will return to a clean fridge.
Wipe down the inside of the fridge with a rag and prop the door open to allow ventilation.
If you are going away for a month or longer, it is always a good idea to unplug your refrigerator to save on your electric bill.
Empty your refrigerator, drain the water tank if you have one, clean the inside of the refrigerator and leave the doors open to avoid any unwanted odors.
A freezer can be left plugged in and should if you have frozen foods as frozen foods can last longer and the electricity saved in that instance is not worth the loss in food.
I always unplug my refrigerator after emptying it and leaving for longer than a month but I leave my deep freezer plugged in.