Sarah Williams, 35, shot “decent, hard-working” former Wesham businesswoman Sadie Hartley, 60, in the head with the weapon on the doorstep of her £500,000 home in the village of Helmshore, Lancashire.
Williams then stabbed and slashed the mother of two 40 times in an “orgy of violence”, Preston Crown Court heard.
The defendant, who denies murder, had been in a past relationship with Ian Johnston, 57, Ms Hartley’s partner, who was out of the country at the time of the attack.
He had ended the relationship with Williams after she became “possessive and difficult” John McDermott, opening the case for the prosecution, told the jury.
“Obsessed” Williams “set her mind” to rekindle the relationship - but Ms Hartley, who owned a medical communications business, was the “obstacle”.
She recruited a second defendant, Katrina Walsh, 56, also from Chester, to help her with the “murderous mission” and who kept a “revealing” diary as they hatched the plot, the court heard.
At just after 8pm on January 14 this year, Ms Hartley received an unexpected knock at the door to her home, on an up-market road in the rural Lancashire village.
“What happened next is truly shocking,” Mr McDermott continued.
“Sarah Williams stood on the doorstep. As soon as the door was opened we suggest she lunged at Sadie Hartley with of all things a stun gun - the sort of thing you might use legitimately to prod cattle.
“She pressed it against her – Sadie Hartley’s head – and incapacitated her.
“Then with what can only be described as almost demonic savagery, she attacked her with a knife.
“She stabbed and slashed at this unfortunate woman; blow after blow, causing appalling and fatal injuries.
“She left her victim in a pool of blood in the hallway; closed the door; walked back to the car she had used on her murderous mission and set off back to her home in Cheshire.
“It was a premeditated, planned assassination of an innocent woman.”
Williams, from Treborth Road, Chester, and Walsh, of Hare Lane, Chester, both deny murder.