Picture a fluorescent-lit barn of a supermarket, marooned in an ocean of a car park, staffed by listless 19-year-old part-timers, its shelves crammed with groceries packaged to within an inch of their irradiated lives. Wait a minute, you don't have to picture this at all – there's a supermarket near you just like that, isn't there? Well, shoppers, it doesn't have to be that way. In fact, the future of the supermarket is already here; the problem is that it's 5,300 miles away under a motorway flyover in California.

Rainbow Grocery and General Store sits on an anonymous strip in a none-too-salubrious neighbourhood of San Francisco. Which makes the experience of your first trip to the store all the more bewildering. Once you've wandered in past the carefully tended Native Plant Garden, clocked the extensive community noticeboard and ecology news posters, you'll wonder for a moment where the staff are: then it dawns on you that quite a few of the tattooed scenesters, old hippies and yummy mummies padding around its aisles aren't buying wholewheat orzo and Palestinian olive oil, but selling it: they work here. Awesome! And dude, what's that music on the PA system? Punk rock! Next you'll notice the bountiful, almost obscene piles of fruit and veg (regularly 'spritzed' by water sprays), canyons of bee-pollen powder, ayurvedic herbs and tinctures, and every sort of vitamin or supplement your body could need, the endless cheese counter, the bakery, the teas (370 types and counting!)... Finally, you arrive at the heart of Rainbow Grocery: Bulk Foods. Which is a distinctly unsexy name for what is a simple, brilliant idea: stacked rows of dispensers and tubs, presenting hundreds of different products, from 30 different types of flour and a dozen types of rice to pecan butter and preserved lemons which you can ladle, pour and scoop into your own containers. Why is there not a supermarket like this on a high street near you?

Admittedly the UK supermarket chains are making an effort to change their spots. Whole Foods, the American retailer, with its penchant for wood decor and folksy chalk-boards, brought a glossier version of the Rainbow Grocery approach to the UK high street when it took over the Fresh and Wild chain in 2007, and opened a high-profile (and loss-making) superstore in Kensington, west London. Tesco, Sainsbury et al have begun to address the clamour from increasing numbers of their customers for locally sourced, 'ethical', organic produce. Since 2006, the six largest supermarket chains have also made a decent fist of reducing by 50 per cent the number of single-use plastic bags dished out at point-of-sale. Let's hope they'll eventually bring the same focus to bear on produce packaging. Rainbow Grocery, however, has been tackling these problems since 1975, and doing so in a way that both explains its success – it made a 9 per cent profit last year on a gross income of $50m from its single, 30,000 sq-ft store – and makes clear why you won't be seeing a branch open near you.

Rainbow grew out of a Californian ashram in the early Seventies. Along with like-minded organisations, its founders attempted to create a 'People's Food System', in which the supply of food became a political way of mobilising local communities (in other words, you'd be treated to a lecture as you bagged up your mung beans). As Larry Gilmore, a worker at Rainbow since 1983 and currently a member of its public relations committee, recalls: "In the Seventies, there were only 20 people working [at Rainbow]: they would just bring in cases of almonds and open them, or barrels of brewer's yeast, five-gallon drums of honey... Back then, bulk selling was a way to get good food at good prices."

Today, that hippie-activist impulse has matured. The store has its own Facebook page, awards grants, makes donations in the local community, pledges to provide "affordable vegetarian food products which have minimal negative impact ecologically and socially" and "buy goods from local organic farmers, collectives, bakers, dairies and other local businesses whenever possible". The result is a brand that has become a by-word for ethical, environmentally aware grocery shopping in California: "If it sells in Rainbow," the saying goes, "it must be good".

How do they practice what they preach? "Local goods", in the context of the continental US, means sourcing produce within a 200-mile radius of the store. And among a quiver of other innovations, Rainbow claims it rarely uses electricity to light its premises during the hours of sunlight, thanks to a recently installed 'daylight harvesting' system of roof skylights and photovoltaic solar panels. The store also does its best to get its customers out of their cars and on to public transport or their bikes: members of the San Francisco Bike Coalition get 10 per cent off their bills, and bike locks are available for those who have forgotten theirs. Bulk purchasing obviously reduces the amount of packaging and, according to Laura Kemp, who sits on Rainbow's ecology committee, their next green aim is to devise a means to reduce the need for those nasty little plastic bags used ' to parcel up fruit and veg for weighing: "There's an island in the Pacific the size of Texas made of those plastic bags."

Which brings us to why, sadly, there is but one Rainbow Grocery: it's a worker-owned cooperative. In the early days, as Gilmore explains, volunteers at Rainbow might expect "10 bucks for a 10-hour shift, and all the food they could eat". Whenever a big decision needed to be taken, the entire workforce would get together, thrash it out and occasionally, according to Gilmore, throw produce to emphasise a point.

Fast forward through four decades of tortuous Bay-area foodie in-fighting and radical politics and Rainbow has emerged at the top of the lentil pile, with a corporate structure very much its own: 260-odd workers (there are no "employees") across 14 autonomous departments, with an annually elected committee representing each (to qualify as a corporate member with a vote, you have to work for 1,000 hours or nine months, attend "orientations" and – gulp – pass a membership test). There is an elected board of directors drawn from the workers, but as Kemp and Gilmore admitted while extolling the virtues of Rainbow's egalitarian ethos, it can take an awful long time to get anything done. And though he says there's capacity to expand the current Rainbow Grocery operation, Gilmore believes a collective is as only strong as its personal relationships, which would suffer with the advent of a chain of stores. So don't expect to see a Rainbow Grocery at Bluewater anytime soon.

Nevertheless, some of its ground-breaking features have already turned up in UK supermarkets: Whole Foods has adopted bulk purchasing, and Tesco's new Cheetham Hill store, the first of a new generation of low-carbon premises, has 'daylight harvesting' features in its roof. Bulk purchases aren't likely, however, with Tesco saying it has no plans for such a strategy, but a few independent small grocers, such as the inspiring bring-your-own-boxes independent store Unpackaged in central London, are making headway. Other features may follow; Gilmore recently hosted a group from the French multi-national retail chain Auchan ("They were intrigued about the emphasis on local produce"), but such contact is uncommon. Anyway, says Kemp, if Rainbow were formally to act as a consultant in the "green-washing" of a big supermarket chain, it would go down badly with the workforce. Which isn't to say the big boys don't snoop round the alfalfa tubs for ideas: "They come in their business suits to have a look at what we're doing," says Kemp. "We can tell!"

"People copying [our ideas] is good," says Gilmore, "we've nothing to fear from it." What Rainbow dislikes, he says, is the 'predatory' use to which these big chains sometimes put their new-found knowledge in order to target established local stores by opening concessions in direct competition, eventually putting them out of business.

Yet one aspect of Rainbow Grocery might not travel so well: its occasionally sanctimonious tone: "We strive to compete with giant chains who falsely mimic our collective structure with 'teams and team leaders', although they still maintain oppressive hierarchical structures in the workplace," says the website – and that's before you get to the bit about the anti-oppression training sessions. Indeed, a San Franciscan friend told me that, on occasion, its staff can be less than forgiving of customers not fully versed in, say, the latest uses of Bladderwrack or Lovage Root.

Despite such objections, what chance would an operation like Rainbow Grocery have in the UK? Not much, says Jason Gissing, co-founder in 2000 of Ocado, an online supermarket that supplies Waitrose produce to its customers, which has an impressive track record for innovation and green credentials of its own. "The hand-wringing middle-classes may well applaud the values of a place like Rainbow, but they aren't going to be living around the corner from the sort of site that a business [like Rainbow Grocery] could afford. And the people who would be living round there wouldn't shop there. There's a degree of hypocrisy in the British consumer – we love to hate Tesco, but we still shop there. [A supermarket like Rainbow] is always going to be niche."

Unlike Rainbow Grocery, Gissing freely admits that Ocado's green concerns are secondary to the business (the website details a raft of measures that, according to them, means shopping with Ocado equates to a smaller carbon footprint per pound of sales than walking to your supermarket). But, he insists, the consumers' broadly increasing appetite for organic and ethically sourced produce will not fade with the recession or time. Any supermarket retailer with an eye on the middle classes is going to have to innovate along the lines that Rainbow has been pursuing for nearly 35 years.

Perhaps the only way you're going to see a supermarket like Rainbow Grocery on the high streets of Britain is if you start your own, workers' cooperative and all. So get yourself over the 1745 Folsom Street, San Francisco. They'd be totally stoked to see you, man. But bring your own bags.