The British chef, a judge on ABC’s cooking competition “The Taste,” admitted Wednesday to using cocaine seven times and marijuana on other occasions to get her through tough times — but she blew off allegations of daily drug use as “absolutely ridiculous.’’

Lawson delivered emotional testimony in the London trial of two former personal assistants accused of stealing from the TV chef and her ex-husband.

The defense claims sisters Elisabetta and Francesca Grillo were given permission to rack up $1 million in charges on the credit card of Lawson’s ex-hubby, Charles Saatchi in exchange for their silence about Lawson’s alleged drug habit, according to defense lawyers.

“I have never been a drug addict. I’ve never been a habitual user,” said Lawson, who also hosts cooking shows on Food Network and its spin-off Cooking Channel.

Lawson, 53, dumped her art-dealer husband over the summer after he was photographed grabbing her by the throat at a London restaurant. She accused Saatchi of cooking up this fraud case to get revenge on her for their rocky breakup.

“He [Saatchi] told everyone that he was taking cocaine out of my nose [at the restaurant],” testified Lawson, host of the cable shows “Nigella’s Kitchen,” “Nigella Bites” and “Nigellissima.”

The celebrity chef shed more light on the ugly scene at Scott’s restaurant on London’s West End, saying it was sparked by her comment about a person strolling by with a baby.

“But what actually happened was that somebody walked by with a very cute baby in a stroller and I said, ‘I am so looking forward to having grandchildren,’ ” Lawson testified, “and he grabbed me by the throat and said ‘I am the only person you should be concerned with. I am the only person who should be giving you pleasure.’ ”

But even in Lawson’s efforts to clear her name from allegations she was a daily drug user, she had to admit to at least a half-dozen occasions when she did coke.

Lawson said she did coke six times with late husband John Diamond after he found out he was dying of cancer.

Cocaine “gave [Diamond] some escape” as he was dying, Lawson testified.

She then described her seventh encounter with the white stuff, saying she was driven to it by Saatchi.

“There was another time I took cocaine. In July 2010 I was having a very, very difficult time,” Lawson said. “I felt subjected to intimate terrorism by Mr. Saatchi.

“A friend of mine offered me some cocaine. I took it.”

Marijuana was also one of her go-to ingredients.

“I have to be honest, I have smoked the odd joint. I found it made an intolerable situation tolerable,” she said. “It’s a false friend and not a good idea.”

Court was adjourned early Wednesday, and Lawson was expected to be back on the witness stand Thursday morning.

Lawson admitted she didn’t want to testify, in light of her messy divorce from Saatchi.

“He [Saatchi] said to me at the start that if I didn’t go back to him and clear his name he would destroy me,” Lawson testified. “I have been put on trial here.”

The millionaire art dealer cruelly labeled her “Higella” and a “habitual criminal” in an e-mail previously read in court, and charged that she was “off her head” on drugs.

“I felt that this would not become a fraud case and I would be put on trial, and that is what has happened,” said Lawson, clad all in black except for a white collar on her blouse.

“I have been put on trial here in front of the world and forced to answer, and I’m happy to answer the allegations, in front of the world’s press. And it comes after a long summer of bullying and abuse and I found it just another chapter in that chapter.”