Lee Taylor, who has 40 previous burglaries on his record, took a laptop and a safe containing over £200 from St Vincent's on Kirkgate.
Prosecuting at Leeds Crown Court, Maryam Ahmad said that in the early hours of November 24 last year, the operations manager had noticed that one of the empty shop units on Kirkgate had two broken windows and evidence that someone had been inside, although nothing was stolen.
On the same evening, Taylor had pushed a wheelie bin against the back wall of the St Vincent's shop and had broken the toilet window to gain access.
While inside he took the Dell laptop, worth £600, from the shop's office and ripped the safe off the wall and took £220 cash.
Later, blood was found near the broken window which matched Taylor's DNA.
The 40-year-old was arrested a short time later and initially denied any involvement.
He eventually admitted trespassing into the first shop with an intent to steal, and trespassing into St Vincent's and stealing.
The court was told that Taylor, of Montague Street, Wakefield, has 70 previous convictions in total.
Mitigating, James Littlehales said that much of his criminal record stemmed from his addiction to Class A drugs, but he had been drug-free for the past years.
However, he told the court he has started drinking to excess.
Mr Littlehales said: "They (the two break-ins) were committed in drink and he has little recollection to what occurred.
"He recalls getting some money which he spent on drink."
Jailing him, Judge Geoffrey Marson QC said: "You have a terrible record including very many burglaries of commercial premises.
"I regard burglaries of charity shops as a particularly aggravating factor. They do nothing but good for members of the public who are struggling themselves.
"They provide an outlet to buy things significantly cheaper.
"It's a dreadful and mean thing that you did. The courts have to send out a message that this sort of behaviour won't be tolerated."