Rory Kramer

Justin Bieber Getting Yard Time with CA Prisoners ... First Pics of Prison Trip

The show Justin Bieber put on for a group of SoCal inmates was less about song and dance, and more about sitting and listening ... as photos of his recent prison visit reveal.

TMZ's obtained pics showing the Biebs surrounded by a big group of prisoners in the yard at the California State Prison of L.A. County. Justin and his pastor took a field trip to the correctional facility last week, but this is our first look at what went down.

In one shot you see Justin listening intently while seated outside, and in another, he appears to be praying. We're told Bieber specifically visited inmates taking part in the prison's Urban Ministry Institute ... a seminary program run by Prison Fellowship.

And, get this, JB also visited the Paws for Life K9 Rescue program, which is the first dog rehab program in a men's maximum-security prison. Inmates actually train them to become service dogs to military vets. Pretty awesome.

As we first reported ... Justin's RV was seen pulling into the prison last week where he was spreading the good word.

One other cool moment from the visit ... we're told Justin committed to personally chartering buses to help families get to remote prisons -- 10-12 hours away from SoCal -- to see loved ones behind bars.

Click here for info about our online advertising practices.