It was the Victorians who invented modern shopping. They gave us the chain brand, the delectable theatre of the shop window, and the full immersion of the department store. The roll call of 19th-century shopping's famous names is still cosily familiar today: Woolworths, Selfridges, John Lewis, Whiteleys, British Home Stores and Marks & Spencer. These are the names that changed for ever the nature of everyday consumption. The act of shopping, once a straightforward financial transaction, was reinvented: it became seen as a delightful, diverting and even therapeutic experience in itself.

In Shopgirls, Pamela Cox and Annabel Hobley demonstrate how women – as workers as well as consumers – were central to this extraordinary transformation of everyday life.

Women were identified as an untapped market with apparently limitless possibilities. There was some public harrumphing about how this new shopping experience simply fuelled women's inherent vulgarity, their susceptibility to frippery and their lack of self-control. But for working-class women, shopwork (which was viewed as more genteel than manual labour, but still not entirely respectable) opened up a new field of employment. In the early 19th century it was considered immoral for a girl to be serving behind a counter. In the space of a few years, the "girling" of retail had given rise to a female workforce that numbered tens of thousands. Sometimes there were genuine opportunities for the woman with some clerical skills at a time of racing change. When Ida Fowle went to work at Charles Harrod's Brompton store in 1885, there were six ledger clerks; five years later, Ida had become chief clerk and had a staff of more than 400. But for the most part, women's work was behind the counter, selling to other women.

Shopgirls were commonly seen as aspiring types who wanted to better themselves. For most, however, the reality behind the smart borrowed clothes was an exhausting ordeal of "standing, smiling and serving", with a 20-minute break for lunch. Being incessantly on one's feet was agonising (customers apparently felt affronted by the sight of a seated shop assistant). Gaslight had extended shops' opening times, and with it the shopgirls' working day, to 15 hours. The girls were paid a pittance and packed into residential dormitories – like domestic servants, shopworkers were subject to controls and regulations that often masqueraded as care for their welfare.

This book shoots out endless fascinating – and sometimes startling – ideas and connections. Shopwork, shopping, shops – they touch on everything. Sex and consumerism were mixed up in the public mind from the beginning. In cheap novelettes, shopgirls found love or sank to scandal. They became a byword for the dangers of social aspirations as tawdry as the wares they sold. In Burlington Arcade, off Piccadilly, where shoppers were guarded by men in livery, the chic shop assistants were expected to offer prostitution on the side to supplement their meagre wages.

Perhaps because shopgirls were the first female workers whose labours (and therefore their discomforts) were literally on show, they were also in the vanguard of progressive movements that changed the conditions of labour. In 1899, the Seats for Shop Assistants Act ensured that there be a seat available behind every shop counter. There are some splendid women campaigners in these pages: the remarkable Jessie Boucherett, for example, the founder of the Society for Promoting the Employment of Women, and Margaret Bondfield, a draper's assistant, who became assistant secretary of the Shop Assistants' Union and ended up a Labour cabinet minister. It was Bondfield, writing as Grace Dare, who exposed the low pay and conditions of shop work in a report for the Women's Industrial Council.

As early as the 1840s, the treadmill labour of shopgirls was taken up by the Early Closing Association, which sought to shorten hours and put an end to Sunday trading. The Shop Hours League campaigned for longer breaks in the shopgirls' grindingly arduous day – and secured a full hour for lunch.

The shopping magnates stepped up their game. They began to introduce leisure and social clubs for their employees – and management trainee courses for women were available in many shops as early as the 1880s. The original John Lewis was a fuddy-duddy of eccentric certainties (he was strongly against the employment of girls with blonde curls and redheads), but his son, John Spedan Lewis, improved living conditions for his workers, and introduced in 1920 the partnership scheme that underpins John Lewis today. "It is all wrong," said Spedan, "to have millionaires before you have ceased to have slums."

The leviathans of consumer goods came under fire from some quarters: GK Chesterton claimed that "awful, interminable emporia" would mean the end of the traditional high street; on 5 November 1876, the owners of small shops in Bayswater burned an effigy of William Whiteley, who had just opened the "Universal Stores" which threatened to sweep them out of business. The cooperative movement offered another, very successful form of resistance to the unregulated labour and high prices that went with the new forms of commerce, aiming, as Cox and Hobley put it, for "nothing less than moral renewal through everyday shopping".

This book accompanies the BBC series of the same name: Cox, who is an academic at Essex University, is its presenter, and Hobley the executive producer. The tone is sometimes uneven, veering between breezy generalisations and denser analysis, but this is a highly readable book, rich in surprising insights and human detail.