Stephen Shappell also agreed to testify against the girlfriend, 36-year-old Morgan Mengel.
Authorities say text messages show that Mengel enlisted Shappell's help in killing her husband, Kevin Mengel, back in June 2010.
Shappell admitted beating Kevin Mengel to death with a shovel after Morgan Mengel tried to poison him.
Shappell was an employee at Kevin Mengel's landscaping business, MKB Property Maintenance in West Goshen, Pa.
Kevin Mengel's body was found behind a school in Newtown Square on June 26, 2010.
Shappell pleaded guilty Friday morning to third degree murder and other charges. He faces 40 to 80 years behind bars.