The first law of thermodynamics states the conversation of energy and heat where the energy in an isolated system may be transformed into another, but never created or destroyed. If 314J of energy was released to the room, then also 314J of energy was removed from food in that refrigerator assuming it is an isolated system