This is a piece about panic buying in the time of coronavirus, and maybe I should stop right there. None of us needs more panic in our lives right now. If there’s one thing psychologists can agree on, it’s that panicky behaviour is contagious. Every time we read an article telling us not to be selfish and ransack the supermarkets, it triggers the thought that food is running out and we must urgently get to the nearest Tesco and buy five packets of pasta and as many tinned tomatoes and lentils as we can carry.

These are certainly unsettled times in which to feed ourselves. Over the past month, we have been exposed to an uncanny sight that has been almost unknown in Britain for decades: empty supermarket shelves. When you are not used to it, this sight does strange things to your insides.

Two weeks ago, pre-lockdown, I popped to Sainsbury’s on the way home from school with my 11-year-old son. He drags his heels at shopping, but I assured him I only wanted to buy potatoes. I had everything else I needed for a shepherd’s pie. But we stopped in our tracks to see that there were no potatoes and indeed, no vegetables of any kind anywhere in the fresh produce aisle, except for a few sad packs of drooping mixed veg for stir fries. The locusts had been. I was aware that hand sanitiser and pasta and toilet roll were in short supply, but hadn’t realised that the fresh and frozen produce aisles were now emptying, too. I suddenly felt shaky. The last time I had seen a food shop with so little actual stuff in it relative to the shelves was on a school trip to Soviet Russia 30 years ago. My son’s eyes lit up: boring old food shopping had become a post-apocalyptic scavenger hunt. “Will frozen roast potatoes work in a shepherd’s pie?” he exclaimed in the near-empty wastes of the frozen food section.

What is generally called panic buying – a common human response to crisis – is not caused by food shortages per se, but by fear. At its root is a fear of scarcity, and this fear is self-fulfilling, because the more people anxiously stockpile, the more others get infected by the panic and the faster the food runs out. According to Steven Taylor, a clinical psychologist and author of The Psychology of Pandemics, which was published last year, there are parallels between the ways people are behaving now and the way they behaved during earlier pandemics such as the Spanish flu of 1918, when there was panic buying of Vicks VapoRub, and the 1968 flu pandemic, when food was looted from restaurants. The difference now, Taylor observes, is that the panic can escalate much faster via social media and online news.

“Inevitably, someone posts dramatic photographs of panic buying,” says Taylor. “This amplifies the sense of scarcity and perceived urgency, which leads to further panic buying.”

The American food writer Helen Rosner has noted an element of “fantasy” to the shoppers who fill entire trolleys with cases of mineral water, given that “staying at home for a few weeks isn’t quite nuclear holocaust”. We need to keep reminding ourselves that there is still generally plenty of food going around, even if it does not always reach the right people at the right time. Prof Tim Benton, who is research director for emerging risks at Chatham House, a London thinktank, told me that the UK has “full warehouses” of non-perishable food and that “the flow of fruit and vegetables from Europe is OK at the moment”, although distribution has clearly been made much more challenging by the spread of coronavirus in Spain and Italy, and the fact that lorries carrying fresh foods have been subject to more delays and checks than before. But there is still food in the shops. Rationally, we don’t need to panic.

But who said the human relationship with food was fully rational? Many people reacted to news of the virus by rushing to the shops, as if the prospect of running low on coffee beans were more terrifying than the risk of exposing yourself or others to infection. One of these people was me. Along with a couple of extra bags of coffee, I stocked up on ground almonds for my daughter who loves to bake; and lemons because they improve everything.

Get the Guardian’s award-winning long reads sent direct to you every Saturday morning

Uncertainty breeds fear, and fear makes a person wonder whether there is enough butter in the fridge. The restrictions on our movement in recent days and weeks, coupled with a daily drip-feed of unease, have been unlike anything most of us can remember. We can’t visit our elderly relatives or even find out whether we are infected or not, but we can at least stock our kitchens with sardines and long-life milk – or gin, as the case may be – to give us the sense that we are somehow prepared. As the Harvard epidemiologist Karestan Koenen says, “food buying helps us feel in control”.

The way we eat at any given time reflects our national state of mind. For 50 years or more in the UK, we have been eating with the largesse of a people who felt that food was an inexhaustible fountain. Unlike the wartime generation, we did not worry too much about wasting odds and ends or saving the bit of bread that was not mouldy, because we knew that there would always be another loaf. Nor did we have to keep track of the seasons, because in the never-ending summer of the supermarkets, blueberries could be shipped in for our pleasure no matter what the month. Yes, there were food banks, but most of the population could push the idea of scarcity far to the back of our minds. For many, these past few weeks have been a shock: a moment when almost everyone in the country felt at least a bit insecure about food, and started to realise that the fountain could dry up.

In some ways, this has been a rare moment of clarity, when we finally recognise how much we owe to the low-paid “key workers” who put in the hours to grow and harvest and pack and cook and deliver so that the rest of us can have food available at all times. But with that clarity comes a new unease. The panic buying and shortages – even if temporary – have revealed to us that our food system is built on a far less solid foundation than we imagined.

On 20 March, the health secretary, Matt Hancock, commented that people should buy only “what they need and not more than what they need”. You can tell that something radical has shifted in our attitudes to food shopping when the Conservative party – which for so long has defended the right of the food industry to sell us anything it likes, regardless of its effects on our health – starts asking people to restrict what they buy for the sake of others.

Hancock’s comments were prompted by a much-shared video featuring a critical care nurse called Dawn Bilbrough, who filmed herself in tears after coming off a 48-hour shift in intensive care and finding that she was unable to buy any fruit or vegetables in the supermarket. “You are just stripping the shelves bare of essential foods,” Bilbrough says in the video. “Just stop it. Because it’s people like me that are going to be looking after you when you’re at your lowest, so just stop it. Please!”

Play Video 0:50 Nurse in tears after coronavirus panic buying leaves shelves empty of food – video

To watch Bilbrough’s video is to feel a visceral reaction against the selfish stockpilers who have deprived this hard-working NHS nurse of fresh produce. Her righteous rage is the same anger that people have felt throughout history towards the hoarders and speculators who put their own interests above the common good. During the Great Famine of England and Wales in 1315-17, the lords hoarded grain while the poor starved. In times of war, hoarding is loathed more than ever, and tends to be more severely policed. In 1941, an egg dealer in Folkestone was sentenced to three months of hard labour for illegally hoarding thousands of eggs and selling them on the black market. With rationing in place, to fiddle the system by taking more than your fair share of food was seen as an appalling form of cheating.

But what on earth would a fair share of food be by today’s standards? Nowadays, you might get through half a week’s wartime ration for meat and eggs in a single breakfast. There was an outcry during the first days of lockdown when some convenience stores reported that police had been trying to stop shopkeepers from selling Easter eggs on the grounds that they were not “essential” food.

For more than half a century, the freedom and abundance of our food system taught us that we could have whatever we want, whenever we wanted it, assuming we could pay. Over the past five years, food delivery services took this freedom still further. Whatever our hearts desired could be ordered up on an app and biked round in minutes, without fear of being judged for ordering too much or failing to share. Suddenly, coronavirus has tested the limits of our rights as consumers. For many modern families, there has been a profound shock to this new reality.

Eating is once again framed as a moral act. There have always been people who felt reassured by bulk buying, and the rest of us didn’t feel the need to judge them for this quirk. But our scrutiny of others has sharpened – and some individual behaviour has been remarkably irresponsible. Supermarket workers have described acts of astonishing selfishness. In an excellent article for HuffPost, American grocery store worker Karleigh Frisbie Brogan described in horrified terms watching one shopper “use his forearm to empty a shelf of refried beans into his cart”. As coronavirus spread through Singapore in February, there was an outcry when a photo was shared on Facebook of a middle-aged woman in a medical mask pushing a trolley piled to shoulder height with instant noodles. Most of the reactions consisted of crying with laughter emojis coupled with insults. Several people suggested that this “aunty” would die not from coronavirus but from an overdose of MSG.

Most of us would not go so far as to wish harm on the hoarders, although we can certainly unite in righteous indignation against these new villains of our post-coronavirus life. Besides the selfish shoppers who clear the shelves of fresh fruit, there are cold-hearted profiteers who buy up essential foods, as well as hand wash and face masks to sell them on at an inflated price. Sky News reported finding a carton of formula milk (normal price: £11) being sold on eBay for more than £300.

The media have focused heavily on these stories of hysterical greed in the shops. “Selfish Tesco shoppers block NHS staff from getting into supermarket after working gruelling 60 hours on coronavirus frontline” read one headline from the Sun on 23 March. But this fixation with selfish shoppers is not good for anyone’s anxiety levels. Some eating-disorder sufferers – who are already often grappling with feelings of guilt about buying food – have reported that reading stories of panic buying have triggered worries that they must not buy food at all, lest they be taking food away from people who need it more. Another reason we should stop talking so much about the stockpilers is that their role in the current upheaval (or their responsibility for the current shortages) is probably not all that important.

Have you noticed that one of the main features of panic buying is that it is always done by other people, and never by ourselves? It is a label we attach to others in order to make ourselves feel better about our own shopping choices. He panic buys. You stock up. I tirelessly provide food for my family.

A binary opposition has sprung up in our culture between shoppers – who are portrayed as grasping and selfish – and workers – who are heroic, especially anyone who works for the NHS. But NHS workers go shopping, too. Some of the people who took vegetables from the shelves before Dawn Bilbrough got there will have been other nurses just like her. They probably didn’t take much more than usual.

True panic buying – as in, cupboards full to the rafters with ramen noodles or packets of pasta – is actually much less common than we think. When market analysis firm Kantar Worldpanel looked at data from 100,000 UK shoppers in mid-March, it found that only 3% of the population engaged in full-blown panic buying. The rest of the increase in food sales over the past month – an extra £1bn in the first three weeks of March – could be explained by consumers adding just a few extra items here and there. Chris Morley of Kantar wrote that the research suggested “huge volumes of consumers were adding a few extra purchases of products they normally buy, and adding a few purchases of categories that they don’t often buy into their trolley or basket [lentils being an obvious example] and were shopping more regularly than usual”.

“I don’t like the term panic buying,” says risk expert Tim Benton. He admits that there have been a few examples of “stupidity” from consumers in the shops, but he argues that for the most part, our patterns of shopping in recent weeks have been a “risk-resilience issue” rather than a “panic response”. People have been told it is their duty to go home and stay there (and in some countries such as Canada, consumers have been explicitly told by politicians to stock up with enough supplies to last a week or two). At the same time, people can no longer have lunch or dinner outside of the home at cafes or restaurants or work canteens, which previously would have accounted for around 30% of all calories eaten in per day in the UK. “They can’t eat out, so they stock their larders,” says Benton.

Facebook Twitter Pinterest Shoppers queue outside a supermarket in Huddersfield. Photograph: Adam Vaughan/Rex/Shutterstock

Some of the people buying more food than usual will have been doing so in order to help out friends and neighbours who are stranded at home. In Singapore in February, journalist Annie Tan observed that many people “decided to multiply their shopping list” in order to “spare their friends and family from knee-numbing queues”. I have seen the same thing here, with WhatsApp groups filling up with neighbourly offers to share everything from fresh fruit to self-raising flour.

Instead of panic buying, perhaps we should speak more of resilience buying. There is solace in feeling prepared, especially when we actually have no idea what’s coming next. During the second world war, the writer Alice B Toklas lived in rural France with the art collector Gertrude Stein. In The Alice B Toklas Cookbook, she describes how she accumulated a store of dried fruits, including 4lb of citron and 2lb of raisins, which she was saving to make a liberation fruit cake when the war was over. From time to time, she would look at the fruit in its jars and feel “cheered” during the “dismal days of that winter”.

This is not a war, thank God. Many people are invoking the spirit of the blitz – and some of us are certainly digging for victory, judging from the fact that vegetable seeds have been bought in vast quantities. But we are not having to make do with wartime rations of dried egg just yet. Knowing that we have a store of the half a dozen things we dread running out of can make us more equipped to summon up the reserves of patience and humour we are all going to need over the next few weeks.

When I put out a request on Twitter asking what items people felt they needed to stock up on most urgently, I was stunned to receive more than 1,300 replies. Many of them read like prose poems, speaking of private passions. “Parmesan. Just parmesan,” read one. “Garlic, olive oil, capers, anchovies, bacon. With them I can make any pulse, grain, or starch taste great,” was another answer, from food broadcaster Sheila Dillon. Chef Alex Rushmer replied that his one essential was Lao Gan Ma crispy chilli oil, because, “If all you had was rice and noodles, Lao Gan Ma would make it OK.”

Common themes emerged. Apart from the obvious answers of staple grains, other popular essentials included onions, ginger and garlic, frozen veg, lemons and cheese, butter and oil, various kinds of pickles and spices: all ingredients for enhancing a meal rustled up from pantry goods. Many people named their favourite stimulants, from teabags to coffee to wine. “Dark chocolate, floor cleaner, gin”, read one of the most bracingly honest replies. Someone wrote from day 15 of lockdown in Madrid to warn that although she had laid in 10 litres of olive oil, she had not anticipated how much chocolate she would want: “You’ll need comfort food after a hard, sad day.”

The spirit that mostly emerged from these tweets was not one of panic, but of warmth and resourcefulness. People started to swap helpful tips on where to source certain hard-to-find products. There was a discussion of the fact that yeast – which is near-unobtainable in mainstream supermarkets, because so many people have started baking for comfort during lockdown – could still be found in some Polish shops, where it is labelled drożdże.

Facebook Twitter Pinterest Shoppers queue outside a supermarket in Essex last month. Photograph: Martin Dalton/REX/Shutterstock

One of the most noticeable features of the current food shortages is the way they have disproportionately affected supermarkets rather than independent shops. A few weeks ago, when there were acres of empty shelves in the out-of-town hypermarkets, I strolled into a medium-sized Turkish shop near where I live in Cambridge and found plentiful supplies of fresh fruits and vegetables, cheeses and yoghurts, dried goods and breads and much more. Many of the items were both cheaper and more appetising than the supermarket equivalent, yet I didn’t witness any customers piling their basket especially high. In a family-run shop like this, you would feel silly to clear the shelves. Others have reported that Korean and Chinese supermarkets in the UK have generally remained much better stocked than the big supermarket chains.

And yet many British people still ignore these independent shops, in their eagerness to join the queue at a hollowed-out supermarket. It is as if we have been brainwashed to believe that these familiar superstores are the only ones that can supply us with the abundance and choice we have become accustomed to.

For years, food policy expert Tim Lang has been an almost lone voice in the wilderness, arguing that UK food security needs to be improved. In his new, very timely book – Feeding Britain: Our Food Problems and How to Fix Them – Lang notes that most consumers think that “as long as there is food on the supermarket shelves, all is well in the world. It is not.” According to Lang, Britain has long had “a false sense of security about food”, and all the more so post-Brexit. There’s an assumption that, as a rich country, we will always be able to buy the produce we need from abroad, but this is a risky assumption in times of crisis.

The empty shelves we have been so shocked by are not just reflective of the behaviour of individual shoppers, but of a supermarket system based on “just in time” delivery systems. The idea – eagerly embraced by all the major UK food retailers – is that the business carries minimal stock, buying only what it needs at any given time, to save on the cost of storage. It’s an efficient and highly profitable model – as long as imports are freely flowing. But even in the good times, as Lang explains in his book, the plenty in our supermarkets was based on “stretched and risky food supply chains”. The current crisis has laid bare the problems with having a food system so heavily weighted towards imports.

A country with the UK’s climate will never be fully self-sufficient in food – we can’t grow our own coffee beans, to take one pressing example – but Lang argues that far more land should be given over to food production. “The UK cannot grow rice or mangoes or bananas, but it could grow 100% of apples, pears and soft fruit, and a more diverse range of vegetables.”

Facebook Twitter Pinterest Shopping restrictions at a supermarket in Warrington last month. Photograph: Gareth Copley

Another weakness in our food supply that coronavirus has highlighted is that it is so unfairly and unequally distributed across the population. The coronavirus outbreak has pushed millions of people in the UK to the brink of food poverty. A report from the Food Foundation in March found that the combination of self-isolation, erratic food availability and a drop in income was leaving many vulnerable households at serious risk of not being able to access an adequate diet without government aid. During the week before lockdown, a food bank in Enfield reported an 80% surge in visitors. As Tim Benton comments, the question is not currently whether there is enough food in the UK, but who gets it – and that ultimately needs to be addressed by the government.

The problem of individual panic buying may turn out to be a trivial worry compared with other, deeper issues in the food system, such as how to remodel it to deliver healthy food for all. Since social distancing and some temporary rationing were put in place in UK supermarkets, panic buying has largely taken care of itself. Because of the social distancing rules, one day last week I found myself one of only 11 people allowed inside a small supermarket. Each item was limited to no more than three per customer, but I only saw people take one or two. The atmosphere felt as hushed as a church, and I noticed that everything from eggs to – yes! – potatoes were now available again. Steven Taylor, expert in the psychology of pandemics, notes that rationing is a far more effective strategy for stopping panic buying during a pandemic than either pleas from the government or “social shaming and ridicule”. Once rationing is in place “and people can see that they can still obtain staples, fears of scarcity tend to abate”.

A much more serious issue on the horizon is panic buying not by consumers, but by governments. On 24 March, Bloomberg reported that some governments had started to put in place protectionist food policies as a response to the coronavirus pandemic. Serbia has halted exports of sunflower oil and Kazakhstan is no longer allowing wheat flour or carrots to leave the country. If such protectionism spreads widely, it could result in higher prices and shortages of certain commodities, particularly for a country such as Britain that is so heavily dependent on imported food.

‘We can’t go back to normal’: how will coronavirus change the world? Read more

“The problem,” says Tim Benton, “is that the more countries [engage in hoarding food], the free flow of food becomes sticky and imports start getting hammered.” Technically, there is enough food in the world to feed current populations. According to the Agricultural Market Information System, which tracks food supplies across the world, “global reserves of non-perishable goods such as wheat and rice should be sufficient to meet any imminent demand”. Trade runs on trust, but at this moment of crisis, many countries seem to be feeling jittery and thinking only of national interests. Benton notes that in the current global food system “we are seeing every country working for itself”. His concern is what could happen to imports of fresh fruits and vegetables from Europe into the UK, given shortages of labour in southern Europe as a result of coronavirus.

These are testing times for food delivery drivers, as Dan Saladino reported on a recent episode of the BBC Food Programme. There have been cases of drivers making the epic journey back from Spain or Italy with lorryfuls of fresh food, only to be turned away at distribution sites in the UK because of fears that they might be bringing in infection. The rest of us should be grateful that, for now, there are still plentiful supplies of fresh fruit and vegetables in Europe, and drivers still prepared to make the trip and get it for us. But we need to stop taking this bountiful flow of food for granted, and start thinking about building a more resilient system. As Benton points out: “You can’t stockpile lettuce.”

• Follow the Long Read on Twitter at @gdnlongread, and sign up to the long read weekly email here.