Kieron Smith, 30, of Proctors Place, Wrockwardine Wood, Telford, and Kieran Joyce, 34, of Chepstow Drive, Leegomery, both deny assaulting Paul Lloyd causing him actually bodily harm on September 27 last year.
They also deny the theft of two mobile telephones and two bank cards belonging to Paul Lloyd.
Mr Gerry Bermingham, prosecuting, told Shrewsbury Crown Court that the offences occurred in a flat in Lord Murray Drive, Woodside.
Mr Lloyd was in the flat with his dogs at the time.
He was punched and kicked by both men, Mr Bermingham alleged and took himself to hospital after the incident.
Giving evidence Mr Lloyd told Shrewsbury Crown Court yesterday that the two men arrived at the flat and set on him. He didn't provoke them, he said.
He went to hospital and, when he returned his mobile phones and bank cards were missing.
Mr Paul Smith for Joyce said that Lloyd had told staff at the hospital that he had been attacked by strangers and he didn't know them.
The hearing continues.