Muhammad Sheikhi told police he had been “roaming around between the people” because he was lonely and wanted to socialise, a court has heard.