A woman who was brutally beaten after watching a man murder her partner inside their home has described how the killer requested a handshake to get him to open the door.
Biannca Edmunds, 34, has been accused of directing her husband to kill her former partner Michael Caposiena due to a dispute over their child.
Prosecutors have charged Edmunds with murder, alleging she assisted, encouraged or directed Glen Cassidy to kill Mr Caposiena at his home in Melbourne's Westmeadows in March 2016.
Edmunds has pleaded not guilty.
Mr Caposiena's girlfriend, Silvana Silva, whom he had met three years prior on a dating website, was watching TV with him when she saw Cassidy walk past their house, the Supreme Court heard on Wednesday.
She alerted her partner, and he told her she was paranoid and said not to call police.
But Cassidy returned, armed with a gun, and rang their doorbell.
She said Mr Caposiena grabbed a knife from their kitchen and answered the door, hiding the weapon behind the door.
The pair had a conversation through the locked security door and she heard Mr Caposiena say "I'm sorry I couldn't do anything for you".
She said he told her to turn the TV volume down and then Cassidy asked Mr Caposiena to shake his hand, which prompted him to unlock the security door.
Cassidy came inside and pointed a gun at Mr Caposiena's head. He tried to move the weapon away while holding a knife next to the gunman's abdomen.
"I hear the bang ... and the only thing I could see was Michael kind of losing balance for a second and just going to the floor," she said.
"I rushed to the door to scream for help, just started screaming outside for help and he pointed the gun towards my head and pulled the trigger as well.
"But it didn't work, then he started assaulting me."
She said Cassidy threw her against the door, grabbed her hair and hit her head repeatedly against a step. She was hospitalised for four days afterwards.
Cassidy collapsed and died from stab wounds inflicted by Mr Caposiena, but Ms Silva said she did not see the stabbing because her eyes were focused on the gun.
Prosecutors allege Cassidy was directed by Edmunds to kill Mr Caposiena over a custody dispute about their child.
Ms Silva said Mr Caposiena did not see the child until they were aged two, when he was allowed six supervised visits, with the final visit occurring one day before the murder.
The jury was shown graphic crime scene footage taken by detectives, with a pool of blood outside the door and a gun inside a pot plant.
Cassidy's body was at the bottom of some stairs, with stab wounds under his arm and ambulance medical material scattered around him.
Inside, Mr Caposiena's body was lying in front of a fridge, with two knives found nearby and a shopping bag that Cassidy was carrying.
The bag contained a knife, some black tape and a sheet of paper with text printed on it.
The trial continues on Thursday.