A homeless man charged with smashing shop windows at Domino's Pizza and the Salvation Army has been sentenced at Oxford Crown Court.