He’s an actor, singer, film producer and restaurateur. But Donnie Wahlberg recently wore the hat of mentor at an inner-city school in the town he now calls home. Like many of the South Shore International College Prep High School students he spoke with, the odds were stacked against him, says Wahlberg, 46, formerly of the boy band New Kids on the Block. Wahlberg plays Danny Reagan in the CBS cop series, “Blue Bloods.” He was the eighth of nine children raised in poverty in Boston’s gritty Dorchester neighborhood (younger brother is actor Mark Wahlberg). His mother was a nurse’s aide and clerk, his father a delivery drive. His family was dependent on food stamps. Most of his siblings dropped out of high school. He says he overcame because he always wanted something more and went after it hard. The actor who currently headlines four TV shows — the others being A&E’s “Donnie Loves Jenny” and “Wahlburgers” and Pop TV’s “Rock This Boat: New Kids on the Block” — moved here after marrying actress and Chicago native Jenny McCarthy last year. He spoke with reporter Maudlyne Ihejirika. A condensed transcript follows.

“It’s very funny. I’ve been on many stages, but walking in to the halls of a school is something that moves me a lot. School was a critical part of my life. As a teen, I was bused to a predominantly black school in the time of great racial tension in Boston. Black kids were being sent to white neighborhoods and vice-versa, and the parents were rioting. Everybody was angry, but the students, we just wanted to go to school.

“Those early days shaped me. While the parents were fighting outside and protesting, I was inside meeting children of all diverse ethnicities, learning what ‘old school’ meant, about music, culture, and differences, and people. If it wasn’t for that, I can’t even imagine where I’d be today. Had I not been on those school buses, I would have had a much more narrow view of the world. So I feel very blessed for that.

“Even though I’m from Boston, I grew up in a very similar place to the South Side. Every single kid in my school was poor. We didn’t have much. The kids who were lucky weren’t on food stamps. But a lot of us had dreams.

“I got my music break from Maurice Starr, who discovered New Edition. New Edition actually lived all around the neighborhood where I went to high school. My first girlfriend dated Bobby Brown before me. Now, that’s really old school. In high school, when they opened a theater class, I just felt like it’s where I belonged. I jumped into theater freshman year, and outside school I formed New Kids On The Block.

“Even though the band took off first, I always knew acting was something I would eventually do. I was one of those kids that every time I walked down the street, I was always thinking about doing a scene in a movie. We did a lot of walking as kids. We didn’t have a family car.

“My acting break came from Mickey Rourke, in ‘Bullet,’ with Tupac Shakur. It wasn’t really a big movie, and it wasn’t that successful, but I got the hunger. I remember talking to Tupac who was probably on his fourth or fifth movie about that time, who said, ‘Once you get the taste of acting, you’re gonna want more.’

“The No. 1 person who pushed me — besides myself — was my mom. When I said, ‘Hey, I wanna go out and do some break-dancing tonight; we’re going to lay down some linoleum and dance on the street corner,’ she didn’t say, ‘Are you crazy?!’ She said, ‘OK, have a good time.’ That little bit of support means a lot.

“‘Blue Bloods’ is a huge hit, and I take it very seriously. For me, the greatest compliment is when I meet a detective or police officer, and they say, ‘You do it the way we’d like to see it on TV.’

“It’s a tough time in our country right now with police officers. But 99 percent of police really want the best, for everyone to be safe and OK. It’s not necessarily fair to judge the great ones for the few bad apples. I’m honored to play a flawed officer, one who makes mistakes and does the wrong thing sometimes. People can learn from that as well.

“Jenny and I both grew up very, very poor, with odds stacked against us, and worked really, really hard. We were dreamers who were willing to step up and risk failure to try to get where we wanted to get. And we got there. So to be able to share even the slightest bit of wisdom and experience with these students means so much to me.”