Arkadiusz Zukowski, 27, of Spindle Court, Mansfield, admitted the break-in at a home on Sheepbridge Lane, at Nottingham Crown Court on Monday.
The victim, who lives with her parents, was in her first floor bedroom at around 12.10pm on August 4, when she heard knocking and saw a man with a blue hold-all at the front door. Assuming he was a door-to-door salesman, she ignored it.
Zukowski went around to the back garden, took a screwdriver from the shed and used it to break in through a rear window.
David Horne, prosecuting said: “Moments later she heard noises downstairs and retreated to her bedroom and called her mother who advised her to call the police immediately. Through a gap in the door she saw a figure on the landing.
“The man walked into her bedroom and she screamed at him to get out. The man ran down the stairs and said ‘OK, I am sorry.’ He ran out of the house.”
In an impact statement the victim said: “I have not felt safe since this person entered my home. I was terrified. I thought this person was going to kill me.
“I am constantly on edge. When I hear a noise I jump up. I can no longer be in my bedroom on my own. I keep re-playing the incident in my head. It has caused me a great deal of stress.”
She feared that the burglar, who knows what she looks like and where she lives, would return to harm her.
A tablet computer was taken during the raid.
William Bennett, mitigating, said Zukowski was aware of the distress he had caused and wanted to communicate to the victim that he bears her no ill-will.
Mr Bennet said: “He couldn’t have been more ashamed to have put a woman in fear.”
He said Zukowski, who had 15 previous convictions, had been in the grip of heroin addiction and committed the burglary as part of a spree. The court heard that he was now on a methadone programme and had reduced his intake of the drug.
District recorder Andrew Easteal said: “You banged on the front door to establish if the house was empty and you made the mistake of thinking it was. You went in and prowled around, looking for something to steal. And then - to her utter terror - you walked into her bedroom. I imagine that experience will stay with her for the rest of her life.”
Zukowski was sentenced to 14 months for the burglary, four months for a separate charge of handling stolen goods and three months for being in breach of a separate suspended sentence. He will serve half of the 21 months in custody before he is eligible for release.
Robert Argile, 39, of Jenkins Avenue, Mansfield, also pleaded guilty to handling stolen goods. He was ordered to carry out 100 hours of unpaid work, and abide by a curfew from 8.30am and 7am during an 18-month supervision order. He must also carry out a rehabilitation activity for ten days.
Both men were ordered to pay a £900 criminal courts charge.