Robert Grey, mitigating, pointed out that there was no damage to the property. He added: "He went into the summer house because he was homeless."

He admitted a charge of burglary before magistrates sent the case to Bournemouth Crown Court because of their lack of sentencing powers.

But instead of sending him back behind bars Recorder Richard Onslow handed Real a 12-month community order.

He also ordered him to attend a "Thinking Skills" programme, which teaches young offenders basic problem skills and develops the way they think and behave.

In passing sentence, Recorder Onslow, said: "You are 21 and whatever else you have been convicted of you have no offences for burglary on your record.

"Do not regard this as a let off, you should regard it as a chance to change your life."

The sentence has been slammed by the two MPs for Bournemouth, who are asking the Attorney General to refer the matter to the Court of the Appeal, which can increase his punishment if it is deemed "unduly lenient".

Mr Ellwood, who was elected to the Bournemouth East seat in 2005, added: "The magistrates had clearly determined a minimum sentence of six months and were looking for something stronger."