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