Geoffrey Owens is using his time in the spotlight to help provide financial security to others in the entertainment community.

The "Cosby Show" alum, who was infamously job-shamed earlier this month for working at a New Jersey Trader Joe's, donated $25,000 gifted to him by Nicki Minaj.

“I would like to give this donation of 25K to the Actor’s Fund in memory of the late, great Earle Hyman – who played Cosby’s father, ‘Russell’, on "The Cosby Show" – who lived his last many years and died at the Actors’ Home, (funded and run by the Actor’s Fund),” Owens, 57, said in a statement to TMZ.

He continued: "I am extremely grateful to Nicki Minaj for enabling struggling actors to continue pursuing their dreams."

More: Bill Cosby's legacy: From America's dad to 'America's rapist'

The "Queen" rapper offered the hefty donation to Owens after a photo of him bagging groceries at the supermarket went viral. (The person who snapped the photo has since expressed regret.)

“This man is a whole (expletive) legend in these streets,” Minaj said on-air during her NSFW Queen Radio show on Beats 1. “That man is now getting so many opportunities, I personally want to donate ... $25,000.”

Owens, who played Sondra Huxtable’s husband, Elvin, on "Cosby" in the '80s and '90s, worked at Trader Joe's for 15 months in between acting gigs to make ends meet.

“I’d been teaching, acting, directing for 30-plus years, but it got to a point where it just didn’t add up enough and you gotta do what you got to do," he told Robin Roberts on "Good Morning America," adding the job offered "flexibility" so he could "try to stay in the business."

Several media outlets reported on Owens' day job, in what many including the actor himself deemed as an attempt to job-shame him. The disappointment didn't last long, however, because the unwanted limelight proved fruitful.

Since the viral photo, and the subsequent backlash, Owens landed roles on Tyler Perry's "The Haves and the Have Nots," "NCIS: New Orleans" and Hilary Swank's upcoming thriller "Fatale." The donation from Minaj was the cherry on top, which Owens ultimately decided to donate to a charity close to his heart.

"Thank you to Geoffrey Owens for paying forward his gift from Nicki Minaj & making a very generous donation of $25,000 to our work," tweeted the Actor's Fund, an organization that provides financial support and a "safety net" for entertainers over the course of their lives.

More: After job-shaming, Geoffrey Owens lands gig on Tyler Perry's 'The Haves and the Have Nots'

Minaj approved of the move.

"I'm happy to be a part of a great cause," the rapper told TMZ. "I wish Geoffrey much success and want him to know how loved he is. Rest in Peace to Earle Hyman."

Related: Celebs defend former 'Cosby Show' actor Geoffrey Owens after Trader Joe's job shaming