Renatas Timofejevas, 36, was operating a loading vehicle at Alba Proteins at The Racks, near Dumfries, when he was found crushed under the boom arm.
A court heard that if window glass on the JCB had been replaced he could not have leaned out and got caught.
The company admitted breaching the health and safety act over the incident in February 2010.
Dumfries Sheriff Court was told that there were no eyewitnesses to the accident.
However, it appeared that Mr Timofejevas had been killed after trying to reach out of a window in which the glass had been missing for up to eight months.
The court heard that if the window been replaced at a cost of just over £300, the worker would not have been able to lean out and be caught.
Sheriff Brian Mohan said the window was only one of a number of defects surrounding the vehicle.
The company admitted failing to provide plant that was safe and without risk to health in that the JCB had numerous defects - in particular window glass missing from the boom window of the operator's cab.
It was also admitted that there was a failure to have an adequate system in place ensuring that the vehicle was adequately inspected and maintained and a failure to ensure that it was only used by trained and authorised persons.
A pet food production company has been fined £80,000 over the death of a Lithuanian worker almost six years ago.