A teenager broke into a Lockwood house because he believed that cannabis was being kept inside.
Cash-strapped Luke Mastalerz, 18, thought that he could sell the drugs on.
But instead he found a dog tied to the cellar of the empty property - and fled taking a television and laptop.
Mastalerz, of Victoria Close, Berry Brow, was linked to the burglary after leaving spots of his blood behind.
He pleaded guilty to the offence when he appeared at Kirklees Magistrates’ Court.
The break-in occurred between February 19 and 22 when the owner of the Meltham Road house was away in Poland.
She left a neighbour looking after it but on her return found that some of her belongings had been taken.
Alex Bozman, prosecuting, said: “Entry had been forced to the bedroom window and the matter was reported to police.
“Blood spots were found on the bannister and this led to a forensic link with Mr Masralerz.
“The complainant said that as a result of this crime she’s afraid to go outside and her social contacts have been limited.”
The court heard that Mastalerz was struggling for funds after his benefits were sanctioned.
The teen had broken in with the intention of taking the drug and selling it to support himself. However, he only found a dog tied to the cellar and left in the belief that the house had been abandoned.
Mohammed Arif, mitigating, said that his client’s problems began before Christmas.
Mastalerz had moved out of his father’s home seeking to be independent but ended up sofa surfing and with no money.
Mr Arif said: “This young man committed the offence to support himself.
“He clearly can’t cope on his own and there is an element of immaturity within him.”
Magistrates gave Mastalerz a community order as a direct alternative to custody.
This includes 200 hours of unpaid work and 10 days of rehabilitative activities.
He must also pay £400 compensation for the stolen items.