The 26-year-old woman claimed Peter Barrowman, 35, attacked her in a prison health centre after supplying her with prescription drugs.
The former inmate broke down as she recalled the alleged attack at HMP Cornton Vale. She told a jury: “I tried to scream and shout and nothing came out. It was just silent. I just wanted to get out.”
Barrowman, from Stenhousemuir, denies raping her as well as two other female prisoners.
He also denies indecently assaulting a fourth prisoner, threatening and abusive behaviour, and stealing and supplying prescription drugs.
In addition, he pleaded not guilty to possessing cocaine at the prison.
The woman said Barrowman often gave her tablets without her seeing the prison doctor. She claimed he told her: “I’m not doing this for nothing.”
The High Court in Glasgow heard the alleged attack in March 2014 took place after she had been called to the health centre by Barrowman.
She claimed he grabbed her and told her to shut up before attacking her. She said she then fled the room and was met by another member of staff.
But Barrowman had followed her, she said, and told his colleague she was “upset” about losing a relative.
She added: “I got back to the block and just stayed in my room. I didn’t want to see anybody.”
The woman told a female member of staff about the alleged attack around three days later.
At court, prosecutor Rosemary Guinnane asked her: “Why did you not tell somebody right away that you had been raped by Peter Barrowman?”
She answered: “I was due to get out and was scared he would come back.”
The trial, before judge Sean Murphy, continues.