Water will leak into the refrigerator when the drain system freezes up. Every time the unit goes into a defrost cycle, water will run down into the refrigerator, instead of down the drain. To clear the drain, remove everything in the freezer so the back panel can be removed. With the panel removed, you will see the evaporator coil and directly under the coil is the drain trough (pan). The trough will probably be full of ice that will need to be removed. With the ice out of the trough, you will be able to see the drain hole which will be plugged with ice. Use hot water to clear the drain hole. Keep working the hot water into the hole and wiping the excess water. This can take quite awhile depending on how deep the ice is. This will need to be done until you get a good water flow down to the bottom drain pan. With the drain system clear, water should stop leaking in the refrigerator.
As for the food freezing on the top shelf, this will be from the freezer getting too cold or the food just needs to be readjusted on the shelf. If the freezer gets too cold (below zero) the air temp blowing in the refrigerator will be too cold also and can freeze some of the food. To check the freezer temperature, place a thermometer between some packages. Air temperature is not a good check. If the temperature is too cold, just adjust the control to a warmer setting. If the temperature is ok, you can turn the air supply down, so less air flows into the refrigerator and move the food so air won't blow directly on anything. This will be the knob on the back panel in the freezer. If you need more assistance you can resubmit your question with more details.