Kieran Rollin, 18, received an eight month sentence, suspended for 12 months, at a Leeds court appearance today.
The court was told how Rollin, of Harrop Well Lane, Wakefield, pleaded guilty after he committed fraud by false representation last year.
After being thrown out of his home, his then girlfriend and her grandmother took him in during February 2017.
Prosecutor Bashir Ahmed said he took the latter’s bank card and made 295 purchases and withdrawals worth £5,787.77 in total between March and October.
The court was told that Rollin, then aged 17, used the funds to buy cannabis, items for himself and gifts for girlfriend Kennedy Cooper, and her grandmother Denise, 67.
He was later arrested and interviewed by police.
Prosecutor Bashir Ahmed said: "He was taken back when he was told how the transactions were £5,000 because he thought it was about £10,000 that he stole. Finally in that interview he said he was sorry."
After being released while police inquiries were on going, Rollin moved back in with his mother Lisa Bacon, the court heard.
Mr Ahmed said that the defendant put a DVD player and television belonging to her online for £10.
She then realised on December 26 that he had stolen her credit card, taking £165.20, the court heard.
Rollin, who has no previous convictions, sold another television which was originally worth £300.
The prosecutor said: “She [his mother] happened to see the advert he had placed on the site.”
The court heard how his mother had been unable to sleep or eat due to the upset his offending had caused her.
Kenton Sergeant, mitigating, said Rollin was "fully aware of the gravity of what he's done and fully ashamed".
He said: "He has realised as he had gone through his mother's bank statement that he has ripped his mother's heart out."
The solicitor said Rollin had suffered depression and was a troubled young man.
Recorder Ray Singh gave him credit for pleading guilty at the earliest opportunity.
He ordered Rollin to do 120 hours unpaid work and to attend help sessions.
Rollin is also subject to a restraining order stopping him going to his mother's home.