Many companies have a sweet spot where revenues gush and profits pool. Pamela’s Products has multiple sweet spots: cookies, brownies, fig bars, cake mix, scones and new oat bars, all adding up to more than $30 million in revenue.

The company, with headquarters and about six people in San Rafael, and manufacturing in Ukiah, attained widespread penetration with gluten-free baked goods in giant retail chains including Whole Foods, Wal-Mart, Costco, Safeway and Kroger. The entire Whole Foods chain — more than 400 stores — carries Pamela’s Products, according to Pamela Giusto-Sorrells, founder and president, who launched the brand in 1988. The bakery sells goods on Amazon and has about 95 employees.

The granddaughter of business owners who in 1940 opened Golden Crescent Health-Foods store at Gough and Fulton streets in San Francisco, Giusto-Sorrells watched her dad bake and sell health-food cookies in his parents’ store. His cookies left out taste. She resolved to improve on the sweets.

About eight years ago, Giusto-Sorrells hired Linda Gerwig as vice president of sales. Gerwig, with food-industry experience at Hain Celestial Group, Barbara’s Bakery and Sunspire, brought corporate sophistication to Pamela’s.

“As long as she has been in business, I have been in this industry,” Gerwig said. “I did have ideas,” she said, keeping her eye on Pamela’s development. “The training is to take our ideas and build a brand. I like the entrepreneur side” of the business, she said. “It’s fun and scary, can go wrong very quickly. It’s risk-embracing.”

Gerwig presented a multi-year business plan. “It’s good for me to treat it like a real company,” Giusto-Sorrells said. “I never expected to be selling more than in the Bay Area.”

Barbara’s Bakery, where Gerwig worked, was founded in Palo Alto in 1971 and moved to Petaluma in 1988. Barbara’s is now a subsidiary of Weetabix Food Co. in the U.K., and has U.S. headquarters in Massachusetts. Weetabix has total revenue of nearly $525 million and is owned by China’s government-controlled Bright Food Group and Lion Capital, a private-equity firm in London. Barbara’s moved out of Petaluma in 2012.

“When Linda came on board,” Giusto-Sorrells said, “she started to build a team. She comes from the corporate world. I am very seat-of-the-pants, have no idea what it takes to have a sales team.”

Giusto-Sorrells carries the company vision and develops recipes for new products. “It’s my palate that decides whether or not it’s a go on recipes,” she said. “The look, the feel. I like being part of a team, the camaraderie. I don’t need to sit on the throne.”

About a year ago, Pamela’s Products launched a new graham-cracker line. Two years ago, it started Figgies & Jammies, which are gluten-free fig bars with added raspberries or blueberries. “Fig newtons are an integral part of our lifestyle — foods that are basic needs,” Giusto-Sorrells said. “Sometimes the simplest stuff is the most wanted, a great graham cracker. Something that you can make a s’more on.” She adopted “shapes that emulate what a graham cracker means to us emotionally.”

Because graham is a form of whole wheat, where the endosperm is typically ground finely then bran and germ are added back, “it’s having to finagle it and figure out a recipe that gives you that emotional and physical satisfaction” without wheat, she said.

This year she is introducing six new pancake mixes — five with sprouted grains and one grain-free made with almonds, pecans, walnuts and coconut. “You can use it the way you would almond meal,” she said. “It offers more variety” for baked products or to sprinkle on yogurt or salad. Of all Pamela’s products, pancake mixes sell most, and were the first of her products taken by Costco, starting in the 2015 holiday season. “They sell more organics than Whole Foods,” she said. “It sold very well.” She aims to place additional products in Costco.

Pamela’s Products sells nationwide and in Canada, and online through Amazon and other mail-order companies. Most sales are through distributors. Discounts from such distributors are based on which store sells the most, she said — such as Whole Foods and Wal-Mart. “If you have enough power and are large enough, you are going to squeeze for the best price,” she said.

“If you are a distributor-driven business,” Gerwig said, “it’s very complicated. They chew you up. You can’t take as many risks.”

The first stores to take Pamela’s Products in the late 1980s were Ms. Gooch’s Natural Food Markets, based in Sherman Oaks. In 1993, Whole Foods Market acquired Mrs. Gooch’s in a $56 million stock deal. In that year, Austin-based Whole Foods had only 22 stores; now it has 431. Mrs. Gooch’s, co-founded by Sandy Gooch and Dan Volland in 1977, had seven stores in the Los Angeles market and nearly $85 million in sales when it was acquired. Whole Foods, founded in 1980, went public in 1992 at $17 a share. Its shares on Aug. 4 traded at about $30, the equivalent of $60 due to a 2-for-1 stock split in 2013.

Pamela’s early cookies were sweetened with concentrated fruit juice before organic sugar hit the market. Her favorite product: chocolate cake mix, along with a new product — salted-caramel frosting. “Together is really fabulous. The vehicle is the chocolate cake,” she said. She recently met with Safeway buyers and brought samples of frosting and cake. “I love dark chocolate. More is better,” and the darker the better, she said. “I was the sugar child, the dessert maker of the family.”

She frequently travels to meet with food-store-chain buyers — show them new products, expand current product offerings. “If I have 50 SKUs (stock-keeping units), they might have 10 or 20 in their store,” she said. “You are always working to get product in.” About 250 brokers represent the line across the country.

Retail chains push constantly to improve margin, she said. “It’s not just smooth sailing. Distributors and retailers are getting much more aggressive, very calculating. It’s about the bottom line. The larger they become, the more power they have, the more they want.” Wal-Mart carries a few Pamela’s SKUs in about 2,000 stores. “Gluten-free is not a big deal to them,” she said. Pamela’s is “a name that’s new in the Midwest.” Lines between natural food and conventional food have blurred, she said.

Kroger was the first Pamela’s customer to demand slotting fees — one-time payments a manufacturer makes to a retailer as a condition for initial placement of a product on shelves or for access to warehouse space. According to a Federal Trade Commission study on slotting allowances, in 2003 there were some 166,000 retail grocery stores, including 33,000 supermarkets with $2 million or more in sales. A typical supermarket with 44,000 square feet carries about 35,000 SKUs. Retail grocery store sales in 2002 were more than $535 billion, with about $412 billion from supermarkets. Retailers reported failure rates for new products in the range of 70 percent and claimed that slotting fees are intended to reduce losses on new products.

“Kroger was a gamble for me,” Giusto-Sorrells said. The chain’s slotting fee was $30,000 for three SKUs. “My products are good enough to be in a conventional store” and outsell other products. There are “always slotting” fees, she said. “It’s part of the game. You have about six months to prove yourself. If you don’t move them,” products are dropped by stores.

Conventional grocers have a policy of guaranteed sales. Any unsold products are charged back to the maker, along with products past their freshness dates.

Distributors take 25 to 30 percent of products they carry, she said. Retailers’ markup is 30 to 35 percent. Shipping to the East Coast costs extra — 2 percent to 5 percent. A box of cookies that sells for $4 might cost the retailer $2.50 from the distributor, which pays the manufacturer roughly $1.60. “People think we make all the money,” she said, but typical gross revenue is 40 percent of retail price. “Food is not an easy business. I have to compete against Nabisco for stomach share.”

Despite producing all gluten-free products, she aims to make goods that “everybody can eat and enjoy,” she said. “You don’t have to be celiac (disease where gluten damages small intestine) to eat my products.” People with celiac disease helped promote her products.

She eats wheat. Her dad made stoneground whole-wheat flour. Her brother owns a wheat-flour mill in Utah.

“My grandmother was a vegetarian,” Giusto-Sorrells said. “She drank carrot juice every day. My grandfather bought the health food store so she could be around her kind of people.”

In the back of the store was a gluten-free bakery. “They were making god-awful gluten-free products back in 1940,” Giusto-Sorrells said, with dense bread “bricks, really thick and heavy. I guess you could slice it.” In the 1960s they sold the store and opened a wholesale flour mill and bakery in South San Francisco. They made rice and soya cookies, which Giusto-Sorrells wrapped when she was a girl. “They tasted awful, smelled awful,” she said. “I used to say to my dad, who eats this stuff? This is so horrible. They were missing the point.”

Her dad, who with his brother bought the flour mill from their father, never analyzed the business to see if they were making money, she said; it was more mission than business. In the 1960s, Frank Ford, a Texas farmer who founded Arrowhead Mills, asked her dad for help milling organically grown grain.

Soon Pamela’s Products will come out with an oatmeal bar branded Oat Up. She developed six flavors. One was “so expensive,” Giusto-Sorrells said, with a combination involving cardamom, pistachios and a secret ingredient we can’t divulge. “We weren’t going to make any profit off it. We had to ditch it. It was really good. We’ll see if we can tweak it to get the same flavor impact.”