Assuming caravan is level & power is getting through to fridge then usual problem if fridge is working on gas & 12v while driving but not on mains elecric is failure of 230v element. These can be replaced, cost of element around £40 depending on fridge. Diy is possible if you know what you are doing.