Any home appliances, in this case a heater is powered by two wires. Out of these two wires, one carry current from live wire to heater and other carry current from heater to neutral/ground/earth. Thus these two wires make a complete close circuit for the flow of current. So the reason someone is getting shock might be the equipment is not properly grounded