Hull Crown Court heard how the worker was contracted to complete electrical work at Greencore Grocery Ltd in October 2013.
The electrician was wiring a motor situated above a machine whilst standing on a stepladder. The company agreed this work activity could be completed using a stepladder which it had provided.
He fell from the stepladder and suffered fatal injuries.
An HSE investigation found that Greencore failed to properly plan this workplace activity from the beginning.
Greencore Grocery Ltd of Sutton Fields Industrial Estate Hull, pleaded guilty to safety breaches and was fined £1m and ordered to pay costs of £30,000.
Speaking after the hearing HSE inspector Denise Fotheringham said: “Falls from height remain one of the most common causes of work related fatalities in Great Britain, the risks associated with working at height are well known.
“Work at height regulations require that all work at height is properly planned and appropriate access is provided. If Greencore had carried this out this death could have been prevented.”