(CNN) -- When Kellogg's dumped its endorsement of Michael Phelps after a photograph surfaced of the Olympic gold medalist using a bong, the company was stuck with thousands of boxes of cereal featuring the swimmer's image.
Kellogg's ended its Michael Phelps endorsement, so it sent two tons of cereal with his face on it to a food bank.
No problem. The company, based in Battle Creek, Michigan, made short order of the already-printed and filled boxes, donating two tons of cereal to the San Francisco Food Bank late last month.
With food banks across the country reporting shortages of food, the donation was a welcome one, said the food bank's director of development, Christopher Wiley. It took only two weeks for about 3,000 boxes to move through warehouse.
"Thousands of families benefited from the donation" Wiley said. "It was a surprise to us. We were lacking a lot of cereal. It is a great product many low-income families really need."
"The real story for us was not the box but what's inside the box. The food is so valuable for the community. It's making good from bad," Wiley said.
The food bank has seen a 6 percent increase in its customer base since the beginning of the year, he said.
Phelps, 23, won a record eight gold medals at the 2008 Olympic Games in Beijing, China.
He admitted "regrettable behavior" after a British newspaper published the controversial photograph in early February. The tabloid News of the World showed Phelps using the bong during what it said was a November party at the University of South Carolina in Columbia.
A bong is a device commonly used to smoke marijuana.
The Phelps box attracted considerable attention to the food bank. Administrators received several calls from people wanting to get the box as a novelty item. But, said Wiley, all the cereal went to food bank customers.
Kellogg's was the only one of Phelps sponsors to drop the athlete, although U.S.A. Swimming, the nation's governing body for competitive swimming, suspended him for three months, withdrew financial support and barred him from competition during the period of his "reprimand."
CNN's Jackie Castillo and Mayra Cuevas contributed to this report.