Logan Head and Joshua Baker, both aged 19 are standing trial at Birmingham Crown Court and deny possessing a firearm with intent to endanger life and an alternate count of possessing a firearm with intent to cause fear of violence.
The charges relate to an incident outside Premier Stores, in Stowheath Lane, at 10.15pm on July 22, 2021, where a man was hit by pellets fired from a sawn-off shotgun which was being held by a passenger in a blue Fiat Abarth car.
Giving evidence, Head admitted driving the car but said he had "no knowledge" of the gun that was used, or that it was in the vehicle.
The prosecution case is that Head, of Hawthorne Road, Tipton, and Baker, of Burton Road, Dudley, were in it together with a third person, Ian Ferguson, who has already pleaded guilty to possessing a firearm with intent to endanger life.
Defending Head, Jasvir Mann asked him what his general movements were in the weeks and hours leading up to the incident and whether he knew the shooting victim, who can't be named for legal reasons.
Head said: "We were driving around on the day looking to steal cars – it was something which was a regular thing we did. We would go to West Bromwich, Wolverhampton, Tipton looking for cars to come back for later in the day.
"But I was not aware there was a firearm in the car and have never touched a firearm in my life. I also had never heard of or knew the person who was shot and I was shocked when it happened.
"We went past the Premier Stores and turned left into a dead end, coming back out and onto Stowheath Lane.
"When I heard the shots fired I swore, because I was stunned. I had no idea there was a gun or any weapon in the car, I knew nothing about it."
When asked whether he thought about stopping the car, turning back or going onto report the incident, Head said he was just in shock and didn't think about what to do next. The car was later found crashed in Tipton.
Nicholas Tatlow, prosecuting, asked Head why internet searches in the days leading up to the shooting showed he had been Googling weapons including a gardening gun, a pipe gun and a .410 shotgun.
Head said the searches related to a recent incident when the girlfriend of a friend had been hit in the face and he wanted to do research into which weapon was used.
He also denied being in telephone contact with Baker on the day, despite the court being told that records linked calls between the two to the same area.
Baker declined to give evidence.
The case continues.