Sean Paul Reid was one of two men who broke into an apartment in the College Gardens complex in Belfast on September 1 last year.
The 38-year-old, from Fitzwilliam Street in the city, was handed a 22-month sentence which was split equally between prison and licence.
He appeared at Belfast Crown Court via a videolink with Maghaberry, where he was sentenced for both the burglary and for possessing the Class C drug Pregabalin.
Reid and another man, who has since passed away, were arrested when the resident of a first-floor apartment College Gardens heard glass smashing and looked out her bedroom window.
The resident witnessed two men then entering an apartment on the first floor via the broken window, which prompted her to call the police.
When officers arrived at the apartment complex, they entered the flat in question and saw Reid and the second man rummaging round in cupboards.
Both men were wearing socks on their hands - which Judge Richard Greene QC said displayed "forensic awareness and pre-meditation" - and when arrested and searched, Reid was found to be in possession of Pregabalin tablets.
At the time of the break-in, Reid was in breach of a suspended sentence and was on bail for previous offences.
Saying breaking into anyone's home "in the dead of night" was a serious crime, Judge Greene said while the female resident was not in her apartment at the time, the incident left her feeling frightened and vulnerable.
The judge also spoke of Reid's "appalling and relevant" criminal record and noted he has "poor emotional and mental health" coupled with addiction issues.
Also noted by Judge Greene was Reid's desire to address these issues by his recent engagement with relevant services, as well as him passing three drugs tests whilst on remand.
In addition to imposing the 22-month sentence, Judge Greene activated the suspended sentence and an additional four months was imposed, which resulted in a sentence totalling 26 months.