Setting aside that there's no good reason to have your refrigerator connected to the internet...
This is really a question for your insurance agent but typically there is a clause in your renters or homeowners policy for spoiled food in the event of a power outage (Not sure how that would apply to a fridge being hacked...) that just gives you a specific payout to replace your food. It's been a while since I reviewed my policy, but I believe I get $500 to replace the food, and I do not have to prove what was in there, just that the power outage happened.