Behind bars! But Kim Kardashian is in character as Nikki is a scene from Drop Dead Diva Kim previously appeared in the first three episodes of the fourth season as the co-inventor of the pake - a pie and cake combination.

Her character played a love interest for Ben Feldman's alter-ego Fred, and went into business with Stacy, who is played by former Two and a Half Men beauty April Bowlby.

The show's creator Josh Berman told The Hollywood Reporter that he wrote around Kim's strengths.

'We wrote her a three episode arc,' he explained. 'But, once she got on set and I was with her I got to see what her strengths were and we got to write to those.

'Her character goes head to head with Jane. She’s got a fantastic twist.'

The Pake! Kim shows off her invention - the pie and cake - to Stacy in one of her first episodes of the show

The Keeping Up With The Kardashians beauty, it soon became apparent, was a con artist with a criminal past who duped Stacy out of her life-savings and left town.

When she reappears it is in a prison cell and wearing an orange jumpsuit. Nikki, who already had a criminal past, has ended up in jail because Stacy has too many parking tickets.

Nancy Grace appears on the episode as herself.

All My Children star Cameron Mathison and The Bold and the Beautiful Ashley Jones will join Kim and Nancy in Episode 12 of the series' fourth season.

Kim previously starred in Beyond the Break and had a guest role in CSI: NY.

Parody: Kim's character parodies her real life, with one of her lines being 'I wish I could make money out of being myself'