Power supply is a vital need of the State of Israel all week, including Shabbat. Interrupting or impairing the supply can endanger human life. Hospitals are full of devices that depend on the supply of power, and even in private homes there are people who are dangerously ill who rely on electrical devices to stay alive. Police officers and security forces use electrical equipment, and without electricity they would be unable to respond properly to emergencies. On cold days, many homes are heated using electricity. If the electricity were to be withheld on Shabbat, babies and sick people would likely be at risk. Very hot days can also pose a certain risk for those who are ill and require air conditioning. In addition, since nowadays we store food for an extended amount of time in refrigerators and freezers, this food may spoil if the electricity is cut off. In a large population, some would likely contract food poisoning, which can be life-threatening.
Therefore, it is necessary for the Israel Electric Corporation (IEC) – whose employees are predominantly Jewish – to supply electricity nonstop, even on Shabbat. If there is some impairment to the supply of electricity in a particular location, whatever is needed to fix it must be done. Since technicians may fix the grid on Shabbat, everyone may benefit from the electricity that is subsequently generated, even though it was restored on Shabbat. The only exception is if a power outage takes place in a small area where it is known for certain that there is no risk to human life involved, in which case the repair may not be made on Shabbat. If it was nevertheless repaired by Jews on Shabbat, one may not benefit from the electricity until an hour after Shabbat. (R. Shlomo Zalman Auerbach, quoted in SSK ch. 32 n. 182; below, 26:6).
Much to our dismay, it is known that IEC workers perform activities on Shabbat that are not essential to guaranteeing the electricity supply, but that are for the purpose of saving money. Furthermore, if there were greater awareness of Shabbat observance, it would be possible to automate the entire electricity-generating system and eliminate the need for human intervention without extra expenses. It would only be necessary to have a few workers in the power stations, monitoring the system and troubleshooting emergencies. However, since in fact the IEC does not try to avoid performing melakha on Shabbat, several leading rabbis ruled that one should not use its electricity on Shabbat (but rather use a local generator) to avoid benefiting from Shabbat desecration or supporting it in any way. (See Ĥazon Ish, OĤ 38:4.)
In practice, though, this electricity may be used on Shabbat, even in Israel. It is true that the IEC could take measures before Shabbat to avoid some of the Shabbat violations. Nevertheless, when its technicians do what is necessary to guarantee the electricity supply, they are not desecrating Shabbat, since electricity is necessary for people to live. Because of this, everyone may benefit from the electricity. Since the consumers do not benefit from the melakhot performed by the IEC technicians for the sole purpose of saving money, and from their perspective it would be better if the procedures were automated, they may benefit from the electricity on Shabbat (see Ha-ĥashmal Ba-halakha vol. 2 ch. 1; Menuĥat Ahava 1:24:1). We have recently learned of efforts to automate the grid and prevent Shabbat desecration.