When pop star Lee Ryan [NB you may not have heard of him but he was a pop star in 2005] switched on the Regent's Street Christmas lights earlier this month it was the final glitter of a shooting star before the darkness for one majestic emporium. Dickens and Jones will be closing in January.

So that's the end of decades of film-fuelled fantasies for legions of women like me: women who have snatched illicit office moments to slip into that marbled palace and glide up the gilded escalators, caressed by the fragrant mist of a hundred perfumes. There'll be no more blandishments to sample Lauder's latest age-defying miracle cream; no more in-store make-overs and champagne previews; no more pretending to be back in the 1940s, celebrating a new hat and silk petticoat over lunch with a lady friend, leaving just enough time for a brief encounter at the station buffet before chuffing back to the suburbs, laden with parcels. Because that's how it feels in Dickens and Jones – like stepping into a continual rerun of Are You Being Served?, with all those deferential Mrs Slocombes stroking their pussies on commission, all those Mr Humphreys eagerly sporting their measuring rods. That fussy, pampering glossiness is a gorgeous anachronism whose demise, along with that of another House of Fraser stalwart, Barkers of Kensington, marks a turning point in the history of high street trading. Once the hallmark of a city's sophistication, department stores are now in sharp decline. In New York, between 1989 and 1999, Macy's, Bloomingdale's and Barneys all filed for bankruptcy. They've managed somehow to stay afloat, although the massive Canadian store Eaton's has finally gone out of business.

The giant retailers in London are also struggling, with the exception of a few iconic sites: Libertys continues to enchant with its eccentric cocktail of glamour and bohemianism; Harrods has become the retailing equivalent of Xanadu; John Lewis, thank goodness, is still never knowingly undersold. But of all of them only Selfridges, which has brilliantly remoulded itself as a monument to art and design, offers a contemporary experience comparable to the excitement the department stores once generated, instilling in women a love of shopping for which we've been ridiculed ever since. But whether it's misogynists using it as proof of female inadequacy, or the left in general who mistrust any rapprochement with market forces, this blanket prejudice fails to recognise the more redeeming aspects of our addiction and its complex roots in Enlightenment thinking.

When Napoleon scoffed that the English were a nation of shopkeepers he was actually quoting that great rationalist economist Adam Smith, who wrote in Wealth of Nations, "To found a great empire for the sole purpose of raising up a people of customers, may at first sight appear a project altogether unfit for a nation of shopkeepers; but extremely fit for a nation that is governed by shopkeepers."

Despite espousing commercial management as the model for a modern state, Smith is far too often crudely pigeon-holed as being merely a right-wing monetarist. Yet his thinking is a great deal more profound and progressive than his detractors assume. Like his friend and mentor David Hume, he believed that national prosperity could only be increased and nurtured through free trade. For them, the expansion of trade alongside the expansion of empire was a project for the common good, aimed at improving prosperity for all.

It also led to the need for more organised display and housing of commodities: for better, bigger shops.

Napoleon may have been contrasting the petit bourgeois mentality of the English with what he regarded as French cultural superiority, but it was actually in France that the forerunners of the department store were first established. From the 1820s, when they began to dominate the cityscape with their glass-roofed, marble-panelled corridors of elegant shops, the arcades of Paris had started to modernise the market place with more regulated pricing and, most significantly, by offering the opportunity for browsing.

The freedom to wander and gaze without having to buy was the defining characteristic of the 19th-century shopping experience and was the most arresting feature of the very first department store. When Aristide Boucicaut opened Bon Marché in Paris in 1852 he introduced a whole new culture of commerce: fixed prices, cash returns, sales, home delivery – and most of all, he excelled at seducing his customers with sensation, so that going to the store became an event, a carnival.

By 1877 Bon Marché was stocking foodstuffs, toys, children's wear, sporting goods and furniture, and was the biggest department store in the world. Boucicaut's example was rapidly replicated by a host of entrepreneurs who, seizing the new opportunities being forged by both mass production and unfettered trade, were living models of the Enlightenment tradition of liberal economy.

William Whiteley, for example, who created London's first department store in Westbourne Grove, argued that by serving his customers he was serving his country because, by following their desires, shoppers stimulated the economy and benefited society and urban life. He became known as the 'Universal Provider' - a merchant who could sell anything to anybody. This was the pattern for the most successful of the innovative new department stores, and once they started to go multimedia there was no stopping them. By the turn of the century Harrods housed 80 departments and boasted that it could source anything from anywhere – a claim tested to its limits when comic actress Beatrice Lillie ordered an alligator for her friend Noel Coward for Christmas.

Whether it was alligators or bedlinen, kelims or kimonos, the trademark of the department store was luxury. Edwardian customers may have flocked to Selfridges Food Hall to gasp in awe at 101 cheeses, or to Harrods to savour spicy continental sweetmeats, but most households would rely on local tradesmen for the day-to-day needs of the kitchen. Larder provisions were necessities for sustaining the family. Department store merchandise was all about adornment and self-gratification. And this new emphasis on creating and satisfying desires and appetites also had its roots in Enlightenment thinking. Adam Smith proposed "opulence and freedom" as "the two greatest blessings men can possess," while his contemporary Dudley North argued that trade and industry are driven by "the exorbitant Appetites of Men... for did men content themselves with bare necessaries, we should have a poor world."

Christianity had always disapproved of trade, associating it with greed and vulgarity and with the dangers of pleasure and excess. It was a view shared by Rousseau who advocated a return to nature and preindustrial values. But the Scottish Enlightenment economists, championing rigorous empiricism against the false superstitions of the Church, welcomed commerce not merely as an antidote to religion but as a replacement for it. So shopping could actually be seen as a gesture of defiance against the Puritanical asceticism that united Christianity with revolution.

The connection between religion and shopping has become a familiar theme in literature, treated with a mixture of contempt and fascination. Commenting on Baudelaire's reference to the "religious intoxication of great cities," Walter Benjamin describes the department stores as "temples consecrated to this intoxication." Zola extends the metaphor in the first ever sex and shopping novel, The Ladies' Paradise, when he refers to the store as "a commercial cathedral," the site of a new feminine religion. His hero, Octave Mouret, is the owner of Bonheur, a new wave department store.

"While the churches were gradually emptied by the wavering of faith, they were replaced in souls that were now empty by his emporium. Women came to him to spend their hours of idleness, the uneasy, trembling hours that they would once have spent in chapel: it was a necessary outlet for nervous passion, the revived struggle of a God against the husband, a constantly renewed cult of the body, with the divine afterlife of beauty. If he had closed his doors, there would have been a riot outside, the frantic cry of pious women denied the confessional and the altar."

The keen sense of irony that permeated Zola's world view would probably not have greatly troubled the new-wave retailers. The department store was quite self-consciously constructed as an earthly paradise, an alternative to spiritual promise. And none was more successful than Macy's, which almost single-handedly pioneered the commercialisation of Christmas. Its most celebrated and much-imitated gimmick was the Christmas window display featuring a new, eagerly awaited theme every December. Subjects might range from Disney to Darth Vader, but with one notable exception: there must be no association with religion.

So while commerce was eagerly replacing Christianity, plenty in heaven was transferred to the promise of plenty here and now, temptingly arrayed in dazzling profusion. A typical essay of the time described the West End shopping streets as "bordered with gold, and bound on each side by glittering edges as rich as the jewels and precious ornaments fringing the costliest robe that ever a monarch wore.... The best exhibitions in this modern Babylon of ours... an ever-changing kaleidoscope of fancy and amusements."

The celebration of the glories of the world is, in quite another sense, a cornerstone of Enlightenment thinking. By recognising common desires and interests, and by rejoicing in beautiful, original creations from all corners of the globe, the department stores declared the universality of mankind. It's a perception captured by Virginia Woolf in Orlando when the 1920s heroine visits Marshall and Snelgrove.

"Now the lift gave a little jerk as it stopped at the first floor; and she had a vision of innumerable coloured stuffs flaunting in a breeze from which came distinct, strange smells; and each time the lift stopped and flung its doors open, there was another slice of the world displayed with all the smells of the world clinging to it."

The Victorians' lust for novelty, invention and sheer plenty had been fuelled by the great exhibitions mounted across Europe, which inspired many of London's leading retail entrepreneurs. In his Arcades project – in which he invites the reader-flaneur to wander through his thoughts, quotations and jottings – Walter Benjamin dismisses world exhibitions as "places of pilgrimage to the commodity fetish." But he also quotes the French philosopher Hippolyte Taine, who describes exhibitions as arising from the wish to "entertain the working classes, and it becomes for them a festival of emancipation".

Similarly, the grand illusion cultivated by the new stores was one of egalitarianism. Selfridges in particular promoted itself as a classless emporium where all were welcome. "We wish it to be clearly understood," the store declared when announcing its opening, "that our invitation is to the whole British public and to visitors from overseas... that all are welcome...."

So although beneath the glossy counters lay the miseries of the sweatshops and the textile mills, the privations of city life and the exploitation of the new breed of shop workers, what the stores held out was the promise of prosperity, the possibility of earthly pleasures. The revolutionary ideals of equality and fraternity may have remained a distant dream – but the shop windows, indicating that they were at least notionally attainable, seemed to beckon a new dawn.

And for women, the department stores brought genuine liberation. In her wonderful account of women's experiences of London's West End, Shopping for Pleasure, Erika Diane Rappaport explores the dramatic impact of the department stores– the opening up of a vista of opportunity and pleasure, offering safe havens for women to exercise choice, expertise and freedom. It is hard to imagine now just how curtailed were the lives of middle-class women in the early part of the century, when to be seen alone on the streets was to risk your reputation. London was especially inhospitable to women, offering nowhere respectable to take refreshments, no lavatories or resting places; you couldn't even be seen taking a drink in public.

And then the department stores began to emerge, all competing to attract the burgeoning class of spending women. Here you could browse and wander and meet your friends; there would be dining areas, powder rooms, even libraries. The whole sensual experience of touching and viewing and buying was suddenly made available – and to thousands of women this was a hugely intoxicating freedom.

For the Suffragettes, the department stores represented both opportunity and limitation. While some more radical women disapproved of the trivial distractions they offered, they also held meetings in the stores and even used them to distribute their own propaganda. Rappaport argues that the extraordinary moment in March 1912, when hordes of militant women rampaged through the West End shattering the windows of nearly 400 shops, was a manifestation of this ambivalence.

"The Suffragettes recognised themselves as consumers and partly accepted retailers' claims that shopping was a female 'right' or form of 'emancipation'," she explains. But now they were demanding more fundamental rights, so "they broke retailers' windows to encourage them to become their advocates and vote against the Liberal government."

Well aware that the Suffragettes represented their most important constituency of customers, the stores supported them by displaying merchandise in the famous violet, white and green colours. Selfridges even flew the Suffragette flag on its roof. There could not have been a more brazen signifier of the confidence of the department stores and their massive public influence.

But that was almost 100 years ago. Today, despite the gaiety of the Christmas windows and the brave insouciance of all those Santas in their tinselled grottoes, the grand age of the department store is gently and elegantly fading. Once the whole world was brought into our grasp in one gigantic palace. Now the universal providers have been replaced by the United Colours of the familiar shops that jostle on every high street and in every suburban mall in the world. The department stores themselves are becoming little more than vertical mini-malls, housing those same identikit chains.

Once women were enchanted by exotic merchandise from distant nations. Now, we can grab cheap trousers and cut-price jumpers, made by massively underpaid workers in the Far East but sporting the labels of all the familiar high street brands.

No wonder our joy at the latest catalogue or the newest range of accessories is tempered with a kind of shame. No wonder that when the redoubtable feminist writer Elaine Showalter confessed her love of shopping she was attacked by academic radicals as the Marie Antoinette of the Modern Languages Association, whose answer to the sweated and unemployed must be 'let them wear Prada'.

What those solemn sisters don't realise, though, is that our urge to splurge is a legacy of the department stores that helped to liberate us, inspiring us with a thirst for knowledge, variety and universal understanding. So next time you thrill to the allure of those ultra-pointy Jimmy Choos, the rugged beauty of a set of Mexican floor tiles, yet another perfect black jacket or a vintage Tiffany lamp that's just popped up on eBay, you have a historical rationale for assuaging your guilt. Alongside your craven capitulation to the wanton cruelty of capitalism as you hand over your credit card, you might also be striking one modest blow for humanism.