The husband of murdered Leeds woman Jessica Patel wanted to start a new life in Australia with his secret boyfriend, a court heard.
Pharmacist Mitesh Patel, 37, hoped to cash in a £2million life insurance policy and set up a new life in Australia with the man he really loved, jurors were told.
He owned and ran a chemists with his wife Jessica, 34, who was strangled at their home in The Avenue, Linthorpe, Middlesbrough, on May 14. She was originally from Leeds.
He denies her murder and is on trial at Teesside Crown Court.
Nicholas Campbell QC, prosecuting, said the husband staged a burglary at their home and strangled her with the intention that intruders would be blamed.
He said: "The prosecution case is that this is a lie.
"You will hear that it was Mr Mitesh Patel, the defendant, who murdered Jessica Patel.
"You will hear that he planned to kill her for some time.
"He has sought information about how to do it including searching online about strangulation, and how long did it take using that method for the victim to die."
The couple were alone in the house together when she was murdered, the prosecution said.
He had previously left the house to create a false alibi, Mr Campbell said, and tried to stage-manage the murder scene.
The prosecution said they did not have to prove evidence of a motive, but there was "ample", Mr Campbell said, as there were various life insurance policies in his wife's name worth £2 million if she died.
Mr Campbell said: "He was planning to use the money to start a new life in Australia and that life would be shared with the person who he really loved, one who he regarded as his soul mate, another man, a doctor by the name Amit Patel."
Before the prosecution opening, jurors were told the defendant had used the Grindr app to meet men for sex.
After the killing, police were to discover Patel had had sexual encounters with many men behind his wife's back, the court heard.
The couple had known each other since childhood, growing up in West Yorkshire's Hindu community, and were married in 2009.
But in 2012, the husband met "the man of his dreams", Mr Campbell said, and he intended to spend his life with him.
As far back as then, Patel began to make a list of the things he would take with him to Australia to start a new life with the man, the court heard.
Amit Patel was to marry a woman to please his mother, against Mitesh Patel's wishes, but later divorced. Mr Campbell said: "As Amit Patel was to put it to Mitesh Patel - 'both of us are mummy's boys'."
A text conversation the two shared in 2012 was seen by Jessica Patel's younger sister and she took a photo of the screen.
The two men refer to a "love toy" and send each other kisses and the discussion was eventually shown to Jessica Patel, who was upset. But it did not lead to the breakdown of their marriage.
They moved to Middlesbrough where they bought a pharmacy, where staff sometimes saw evidence of his cruelty, calling her stupid and lying about her being pregnant, Mr Campbell said.
One employee saw CCTV footage of Mitesh Patel bringing a man into the pharmacy and kissing him.
Staff also saw him using the Grindr app on his phone, which he would leave on the counter.
His wife also found graphic sexual pictures of men on his mobile devices, which he later said were "banter".
In messages discussing IVF treatment, Mrs Patel said she was reluctant to go through with it, given the images she had seen.
When her husband failed to persuade her to go through with it, he messaged her: "Ok then I'm telling you this then we are parting ways."
Mr Campbell said Patel wanted to have children, his wife was the means to do it and he pressured her to go through with IVF.
After Amit Patel moved to Australia, he continued contact with Mitesh Patel and the pair hoped to bring up a child Jessica Patel conceived, Mr Campbell said.
"How was that to be achieved?" he asked. "Well, as far as this defendant was concerned, by killing Jessica Patel."
The court heard that internet searches in January 2013 found he had looked up "I need to kill my wife" and "insulin overdose" and "hiring hitman UK".
When he was arrested, police found insulin in syringes in his laptop bag.
Mr Campbell said when Patel visited India for a relative's funeral he had unprotected sex with a male prostitute for 2,000 rupees (around £21). The couple underwent several rounds of IVF and in March three embryos were created.
In the same month she was killed, Patel told a neighbour his wife was very trusting and that "one day she would end up getting murdered," Mr Campbell said.
And during a family holiday to the Canaries that same month, he messaged Amit Patel to say: "You know this plan, do you think we will succeed?"
Amit Patel replied: "Only you know the answer."
The defendant got no reply when he responded: "Do you think it is a bad plan?"