A woman was shot with an electric stun gun, bound and gagged and then buried alive in a box after her partner got "bored" with her, a jury has been told.
Michelina Lewandowska, 27, was taken to woods and buried in a shallow grave in May, Leeds Crown Court heard.
Miss Lewandowska escaped from the box and flagged down a passing car.
Her partner, Marcin Kasprzak, 25, of Penistone Road, and Patryk Borys, 18, of Rashcliffe Hill Road, both Huddersfield, deny attempted murder.
Prosecuting, Jonathan Sharp said: "In a nutshell, this case is about a young man who got bored with his partner, the mother of his child, and he decided to get rid of her."
The barrister said the victim was attacked with a 300,000 volt Taser stun gun, bound and gagged with tape and "imprisoned" in a box.
He added: "He and his friend imprisoned her in a box, drove her to a wooded area where it was unlikely she would be found, and there dug a shallow grave and buried her alive."
The court heard that 25-year-old Mr Kasprzak told his partner that she was not as good-looking as the girls he saw at the gym.
Jurors heard he would go out with friends, sometimes staying out all night, rather than spending time with her.
He was thinking about starting a relationship with another woman and had changed his Facebook status to single, the prosecutor said.
He said things came to a head in May this year when Mr Kasprzak used a 300,000-volt Taser on his partner and recruited his friend Mr Borys, 18, to help.
He said: "It is right to say the stun gun did not have the effect it was advertised. Michelina was not paralysed."
He said she was put in a computer box and it was taped up securely. Two holes were left to allow air in.
He said the defendants dug a hole big enough to take the box in countryside near Huddersfield.
He added: "They carried Michelina, sealed in the box, up the hill, placed her in the hole, and then piled earth both around and on top of the box. They found a large branch, weighing some 40kg (88lb) and placed it across the box."
"Michelina was not unconscious and she was able to, with great difficulty, get herself out of the box and the earth covering and surrounding it."