A homeless man caught red-handed as he burgled his grandparents’ house in Melksham has avoided a jail sentence after a judge heard how his victims were supporting him.

Lee Wilshire’s grandmother accompanied him to court where he faced sentencing for a string of break-ins at the homes of friends and family.

After hearing how Wilshire, now of Bank Street, Melksham, was stealing to buy food, a judge imposed a suspended sentence.

Colin Meeke, prosecuting, told Swindon Crown Court on Friday how Wilshire, 20, was caught in the act.

He said Wilshire’s grandfather arrived at his home in Savernake Avenue just before 3pm on December 19 and heard a noise in the bedroom. When he went to investigate he found his grandson standing by an open window, which he was sure had been locked as they had been burgled before, and told him to leave.

He was arrested and admitted he had been the burglar when their house had been raided earlier, as well as carrying out the latest break-in.

Mr Meeke said two weeks later Wilshire was at a friend’s house in Marti Close when he took the opportunity to steal a back door key. Later that night he crept in and stole a laptop.

He was suspected straight away and when police went to where he was living he handed over the computer, charger and mouse from under his bed and the key from a shelf.

Wilshire admitted two counts of burglary and asked for three others to be taken into consideration.

Stephen Clifford, defending, said his client had left home at 15 and had no qualifications.

He fell in with the wrong crowd in 2006 and burgled his mum’s house, which he admitted during a police interview.

Mr Clifford said after that he settled down with a girlfriend, living with her parents who ran a pub and working there, but he became homeless and jobless when the relationship failed.

In November and December last year he committed the string of offences as he had not sought benefits or help with accommodation. Since then he has got into a new relationship, got help with housing and has the offer of employment.

Judge Euan Ambrose said: “I accept there is genuine remorse. It is very significant your grandparents are supportive of you. Your grandfather wrote a victim personal statement and it very much is of support for you.”

He imposed a nine-month jail term suspended for two years and told Wilshire to do 100 hours of community service and a year of supervision.