French Algerian Abdelghani Benchikh, 36, was ordered to carry out 150 hours community service at Edinburgh Sheriff Court yesterday.
He had borrowed more than £4000 from a London loanshark to fund the operation his mother needed, but struggled to pay it back.
In August, police found Benchikh in possession of five fraudulent credit cards.
Over three days he had bought, or attempted to buy, £3,000 worth of computers and jewellery from city retailers using fake cards. One became suspicious and called police.
The court impose a non-custodial sentence on Benchikh as he had spent six months on remand.