A Wiltshire man who was found 'naked and hiding in a shed' after breaking into an elderly woman’s home has avoided prison.