She was a 20-year-old unemployed heroin addict locked up in jail with nowhere to go when she got out, except for an abandoned building on Chicago’s West Side.

But behind bars in 2009, the woman said she learned about Benjamin “Beanz” Biancofiori — a man who would give her a place to go so she could “be out of the cold.”

He did. But then he said she owed him money. And testifying Thursday at the Dirksen Federal Courthouse, she told a jury she wound up earning cash as a prostitute in the Chicago area. She said she worked seven days a week and saw an average of eight or nine clients each day, earning between $1,250 and $2,000 every 24 hours.

And Biancofiori made sure she never saw a dime of it.

“There was no way out,” she said.

The woman testified at the federal sex trafficking trial of Biancofiori, a Naperville man who allegedly spent nine years as a “violent pimp” using money, drugs, mind games and vicious beatings to control his young, vulnerable victims. He has pleaded not guilty.

Biancofiori, his tattoos peeking out from under his teal dress shirt, watched the woman testify from the defense table in U.S. District Judge Harry Leinenweber’s courtroom. U.S. Attorney John Lausch also attended portions of the trial Thursday.

The feds say Biancofiori once ordered a victim kidnapped and returned to him at gunpoint. They say he also flaunted hundred-dollar bills and diamond jewelry on social media and declared, “Loyalty is a must. We bleed together.”

After one victim ran with $200, Biancofiori allegedly told her in a phone call recorded for the feds that, “You stole from me, b—-, and you threatened to snitch on me.” Then he added, “I’m gonna show you what real killers do.”

The Chicago Sun-Times is not naming the woman who testified Thursday. But she told jurors that Biancofiori controlled practically every aspect of her life. She said he decided how much heroin she could use every day, how much she could spend on food — usually $10 a day at McDonald’s — and how often she worked for him.

She said, “he did give me Christmas at home,” but he came to collect her that night.

The woman said she couldn’t remember how many times Biancofiori hit her or told others to do so. And she said she couldn’t count how many times he threatened her or her family. She said he even took her Social Security card and birth certificate.

“I had nowhere to go, nowhere to hide,” the woman said.

Along the way, she said she recruited an old high school classmate into Biancofiori’s enterprise. And she testified that she did so simply to give Biancofiori someone else to terrorize.

“I feel really bad for what I did,” she said.

The woman said she finally escaped his clutches in April 2010, while she was working as a prostitute with another woman at a Motel 6. She said they persuaded one of Biancofiori’s accomplices to go get laundry soap so they could wash their clothing. When he left, she said they ran, asked the hotel manager to lock them in a room and then called 911.

The woman said she’s “been in hiding for a while now.”

“I struggled throughout my life to get over this,” she said.