The sentencing of Nicholas Mitchell, 39, of Dover, New Hampshire, followed an agreement with prosecutors in which he pleaded guilty in June to one of two counts of tampering with a consumer product.
He also must pay nearly $322,000 (US$230,000) in restitution to Hannaford Supermarkets.
Although no one was injured, the crime was dangerous and spread fear in the community, the judge said.
Mitchell tearfully apologised for his actions and said he did it to get back at the pizza dough company that fired him, not to hurt anybody.
Surveillance video from last year showed him handling pizza dough and loitering around a refrigerated case before exiting the store without buying anything.
Mitchell was arrested in October 2020 after razor blades were found in dough sold at a Hannaford store in Saco, Maine.
Three customers had bought tainted products in Saco and discovered blades hidden inside, prosecutors said.
Product tampering also occurred at Hannaford stores in Sanford, Maine, and Dover, New Hampshire, prompting investigations by police departments in those communities, as well.
Mitchell was a former employee of It’ll Be Pizza.
The Scarborough, Maine, company makes several brands of dough, including the Portland Pie Co. dough that was allegedly tampered with.
Court documents indicated Mitchell’s life spiralled out of control during the pandemic when his girlfriend, a self-employed hair stylist, was out of work and Mitchell was arrested following a domestic disturbance, leaving him homeless and living in his car.
He was later fired from his job at It’ll Be Pizza.
Under the agreement, Mitchell agreed not to appeal a sentence that is no greater than four years and nine months, according to court documents.
The maximum penalty for product tampering in those states is 10 years in prison.
Taronga Zoo announce ‘ridiculously cute’ new arrival