Claire Jardine, 28, tried to win a judge's sympathy by pretending to be a criminal's pregnant girlfriend.
She hoped the ruse would persuade Judge Richard Benson to be lenient when sentencing 46-year-old Paul Eaton for deception.
But he had been tipped off and had her arrested after she left the witness box at Leicester Crown Court.
Tipped off
The same court on Friday heard how Jardine had been asked to fool the judge by her real boyfriend, John Wright, who was a friend of Eaton.
She claimed her name was Amanda Burton, and had been been dating Eaton for six years and was five months pregnant with his child.
She made a passionate plea for him to be spared prison.
But Judge Benson had been tipped off about the scam in August of this year and Jardine, Wright and Eaton were all charged with perverting the course of justice.
Credit card
Jardine, of Tatlow Road, and Wright, of Kinsdale Road, both Leicester, pleaded guilty and were sentenced to six months prison terms.
Eaton, of Hawkes Hill, Leicester, also admitted perverting the course of justice, handling a stolen credit card and using it to obtain goods worth nearly £1,000.
He was given two consecutive six month terms.
The judge also ordered him to serve 14 months of an unexpired prison licence, making a total sentence of 26 months.