When Peace Corps volunteers Tim McCollum and Brett Beach were in Madagascar a decade ago, they realized the African island nation had some of the best chocolate in the world, but didn’t export any of it.

“We fell in love with the country and wanted to do more,” McCollum explained. Madagascar was so poor, however, that few of the locals could afford to buy candy, leaving a new chocolate factory with lots of excess capacity.

One million bars of chocolate later, their company, Madécasse, continues to import and sell both chocolate and vanilla products that are entirely made in Madagascar. McCollum says making it all in-country multiplies the “value chain” and economic effects for the native people.

Outgrowing a workspace at the Metropolitan Exchange at 33 Flatbush Ave., the company signed a lease early last year at the former Pfizer factory at 630 Flushing Ave., on the border of South Williamsburg and Bed-Stuy in Brooklyn. They now have several different-sized spaces and a refrigerated storeroom — key to preventing a product meltdown.

This former Pfizer pharmaceutical factory is being turned into a home for light food processing and creative office uses by Jeffrey Rosenblum and Ashish Dua of Acumen Capital Partners.

The two had worked together at Time Equities before beginning Acumen to “breathe new life” into old buildings with sustainable and energy-efficient restorations.

Pfizer sold the partners the eight-story building for $16 million and provided two mortgages that total $20.85 million, but restricted occupancy in the 1946 behemoth to non-residential uses. Additional mortgage funds are being used to upgrade and retrofit the property.

“This was its historical building,” said Rosenblum. “They wanted it to remain offices.”

But after not being used for three dusty years, it needed some light, air and paint. “It wasn’t anything like it is today,” recalled McCollum of January 2012, when they shared small pieces of the eighth floor with McClure’s Pickles. The rest of the 825,000-square-foot building was vacant.

Since then, the variety of available spaces, former laboratories and offices in the sprawling complex have roped in a multitude of small food companies like Brooklyn Piggies, which offers an artisanal twist on everyone’s favorite hors d’oeuvres.

Every few days, another company logo appears on what has become a colorful wall in the lobby.

The attended gatehouse and huge parking lot has also attracted the large, not-for-profit food service for AIDS patients, God’s Love We Deliver, while its own Manhattan digs are being renovated.

Tenant Good Eggs hosts a website for online ordering from local farmers and bespoke cooks. Local manager, Josh Morgenthau — the grandson of former Manhattan District Attorney Robert Morgenthau — grew up on the family farm in East Fishkill, NY.

Orders are combined at Good Eggs, he said, which delivers them via truck or bicycle or to distribution points.

The lower floors of the Pfizer building have a still dormant gym and cafeteria. Rosenblum and Dua say they will eventually open up former truck bays along the Harrison Avenue side of the building for retail stores to enliven the neighborhood.

By next spring, Brooklyn Grange — which grows produce for local restaurants on the roof at Acumen’s Standard Motor Products Building in Long Island City — will be growing food and herbs on the Pfizer roof, as well.

With views of the Manhattan and Downtown Brooklyn skylines, the roof is now a popular break spot for employees of current tenants.

Another new 15,000-square-foot tenant is the Pratt Institute-founded Brooklyn Fashion and Design Accelerator (BFDA), which has workspace and mentoring for 30 startups, ranging from apparel production to digital fabrication.

Not one to turn down a creative rental use, Rosenblum and Dua have also leased to TV shows.

Last month, a concrete, garage-like space was used by the NBC series “Blacklist,” which stars James Spader as a criminal who helps the FBI take down international terrorists.

As the union crew ate lunch, pools of stage blood were coagulating nearby. The morning scene had featured Spader and a wounded FBI agent taking refuge inside the series’ large bullet-proof glass interrogation box as armed bad guys attacked.

“We’ll have to get them to clean this up,” said Rosenblum to Dua as they spotted some stray red splotches in the adjacent lobby. In the Pfizer building, truly anything goes.