Joseph Carrigan was arrested shortly after the raid on Mulberries Salon, on Carolgate, at 2am, on February 21.
His right hand was bleeding from a cut, said prosecutor Robert Carr, and he had seven items of jewellery in a satchell, as well as a hammer and a small knife.
Carrigan told police he planned to sell the jewellery to find his £200 per day heroin habit.
“He said the knife was for his personal protection and he would use it if he felt threatened,” said Mr Carr.
The court heard CCTV had recorded him stealing £69 of detergent, from Boyes on February 7 and 10, as well as deoderant, from Wilkos, on February 19.
He was also spotted attempting to steal £120 of clothing from Sports Direct.
He tested positive for cocaine and opiates at the police station, the court heard.
“He was last in court in August last year, and had previous convictions for non-dwelling burglaries in 2010.
Rebecca Williams, for Carrigan, said: “Rather unusually he has asked that I don’t mitigate these offences and just explain his circumstances.
“He is homeless, he is addicted to heroin, he has no family support.
“He wishes to be sent to prison. He wants to get clear of his heroin addiction.
“He said that if you don’t feel 12 months is sufficient, you can send him to the crown court.”
Carrigan, 36, admitted the non-dwelling burglary, the shop thefts, and possession of the knife and going equipped with a hammer, when he appeared at Mansfield Magistrates Court, on Friday.
He was given a total of 12 months in prison, and he was ordered to pay £100 towards the £200 cost of repairing the window.