Described by Ligurian-born chef Lucio Galletto in his book The Art of Pasta as “one of the few dishes that unify Italy”, pasta and beans (pasta e fasoi, he says in the north, pasta fazool if you’re Dean Martin) is “peasant food of the most warming and comforting kind”, according to Russell Norman. It’s also one of those recipes with as many versions as there are cooks, differing not only, Gennaro Contaldo observes, from region to region, “but also among families”.

Such hearty, starchy dishes were once an important part of everyday diets all over Europe, beans being both easy to grow and to store – indeed, the rather austere rule of St Benedict allotted monks a pint of beans and a pound of bread a day – and though these days we all have access to more exotic fare, it’s hard to deny their attractions as a thrifty, satisfying stomach-filler. But if you don’t have a treasured recipe handed down from your nonna, what’s the best way to enjoy pasta e fagioli?

The beans

Lucio Galletto’s version: one of the few dishes that unify Italy’. Thumbs by Felicity Cloake.

Perhaps unsurprisingly, this universally popular dish can be made with a number of different beans – Marcella Hazan calls borlotti, “brightly marbled in white and pink”, the “classic” variety in her Essentials of Classic Italian Cooking, recommending the fresh sort when in season. When cooked, she says, “its flavour is unlike that of any other bean, subtly recalling chestnuts”. Outside their summer season, dried, as used by Anna, one of the nonnas in the new Pasta Grannies book, and Norman in his book Polpo, are a “wholly satisfactory substitute”. Contaldo recommends tinned in his Pasta Perfecto!, though, “time permitting”, you could use dried “if you prefer”; Galletto’s recipe, “alla montanara”, deploys dried “large white beans, called fagioli di Spagna in Italian”, and, I assume, butter beans in English.

Happily, I find fresh, candy-spotted borlotti without too much trouble, and can confirm that they are truly worth tracking down (or planting for next year): plump and nutty, they’re a quite superior product to the dried kind. However, as the season draws to a close, they’re not the most practical recommendation. Tinned work just fine, especially if you’re in a hurry (Contaldo’s recipe can be on the table in half an hour), but dried are a better alternative, simply because you can flavour them as you like during cooking, and use the cooking water to make a really beany broth, of which more later. If you do use tinned, loosen the water in the tin with chicken or vegetable stock.

Norman cooks his beans with onion, garlic and rosemary, while nonna Anna and Galletto pop in carrot and celery. The sharpness of garlic doesn’t feel quite right here for some reason, but the other vegetables are a great pairing with the earthiness of the beans, giving them a fuller, more rounded flavour.

Both Hazan and Contaldo mash some of the cooked beans into the broth to thicken it, which seems an eminently sensible idea, making the whole dish even more emphatically beany – on which note, though Galletto’s butter beans work just fine, we find they lack the flavour of the borlotti – even Hazan’s suggested kidney beans would probably be a more interesting option. So often relegated to a supporting role, beans should be the star ingredient in this dish.

The base

Gennaro Contaldo’s recipe for fagioli ‘can be on the table in half an hour’.

Infusing the beans alone is not enough; all the recipes I try include a soffrito, or a base of fried onion, often with carrot and celery, too, sometimes with garlic and, in the case of Galletto, red chilli as well, which is then combined with the beans and their broth. Some, including Contaldo and Anna, add pancetta and crumbled sausage, and some such as Galletto use prosciutto – this dish is pretty delicious without meat, but if you do eat it, a little pork fat is rarely a bad thing for flavour. Pancetta is the easiest way to achieve this, but for a more substantial, almost ragù-like soup, Anna’s sausage version is a winner with my testers. Otherwise, I’m going to keep the soffrito fairly simple by adding more in the way of onion, celery and carrot to give the dish a breadth of texture as well as taste: chilli, garlic, celery leaves and so on are entirely up to you.

The liquid

‘Peasant food of the most warming and comforting kind’: Russell Norman’s pasta e fagioli.

Tomatoes are very much optional – they play no part at all in Contaldo’s recipe – but, simmered down until they become one with the beans, they do add a pleasant dose of umami. Indeed, if you’re really keen on them, try Norman’s version, which stirs in a rich, long-simmered tomato sauce to create a creamily robust tomato and bean soup that is surely the very definition of a cockle-warmer, whatever that is in Italian.

Hazan loosens her soup with beef stock and Contaldo with vegetable, but I’m going to stick with the bean cooking liquid, so the predominant flavour is that, rather than meat or aromatics. If you would like to use stock, a neutral chicken would be my preference for omnivores.

Make it as thick or as thin as you like: according to Contaldo’s sister Adriana, “the real pasta e fagioli should have a thicker consistency” but I’d be very surprised if there weren’t millions of Italians prepared to argue the exact opposite.

The pasta

Marcella Hazan uses ‘maltagliati, or fresh egg pasta lozenges’.

Naturally, there’s no consensus here, either. Norman writes: “I have seen this made with tagliatelle, bigoli and penne, none of which seems right to me. I like the pasta to be roughly the same size as the beans,” which means small dried macaroni. Contaldo calls for fresh egg tagliatelle or pappardelle, cut into 7cm lengths, Galetto for maccheroncini, ditalini or broken spaghetti, and Hazan and Anna both make their own in the form of maltagliati, or fresh egg pasta lozenges, and cresc’tajat respectively.

The latter, a speciality of Le Marche, is, according to the woman behind the Pasta Grannies book and project, Vicky Bennison, “a fine example of frugal cooking. It used to be made with leftover polenta and served with stewed wild greens or beans, which is what Anna made for us.” I squidge cold polenta with flour, then roll it out and cut it into diamond shapes before cooking it in boiling water – it has a satisfying solidity about it that we all love, and if you happen to have any leftover polenta knocking about, I commend the idea to you. Otherwise, this being a simple, frugal dish, use whatever dried pasta you have to hand; I think the slight chewiness is a more pleasurable with the soft beans than the fresh kind, but whatever floats your boat. Personally, I’m not keen on short lengths of spaghetti (so hard to pick up), so I use Norman’s macaroni.

Galetto also uses potatoes, cooking them and the pasta in the residual heat of the broth. My spuds are still crunchy even after the allotted two hours, but I like the idea of them if you’re looking to bulk the dish out even further: some days are just three-starch days.

To finish

If you’re feeling fancy, Norman’s garlic and rosemary oil is a lovely, punchy way to finish the dish, but for me it’s all about comfort, so I’m making like Marcella and adding a knob of butter and a sprinkling of parmesan. And a great big spoon.

Perfect pasta e fagioli

Prep 10 min

Soak 8 hr

Cook 90 min

Serves 4

175g dried borlotti beans

2 celery sticks

2 carrots

1 large onion

Sprig of rosemary (optional)

2 tbsp extra virgin olive oil

75g fatty pancetta, diced (optional)

2 tinned plum tomatoes

175g small macaroni, or other dried pasta

25g butter

15g grated parmesan or pecorino

Soak the beans in plenty of cold water for about eight hours, then drain. Put in a large pan with one each of the carrots and celery sticks, both snapped in half, and half the onion.

Put the soaked borlotti beans in a pot with one carrot, one celery stick and half an onion. Cover with water, bring to a boil and simmer for an hour.

Cover with cold water by about 3cm, bring to a boil, then skim the top. Add the rosemary, if using, turn down the heat and cook until the beans are tender (this should take around an hour, depending on their freshness). Make sure the beans are always covered with water, so top up as necessary.

Towards the end of the cooking time, peel and cut the remaining onion, carrot and celery into fairly fine dice, keeping the onion separate.

Dice and fry the remaining onion, carrot and celery in olive oil until soft and golden.

Heat the oil in a wide, high-sided pan over a medium-low heat and saute the onion until soft and golden, then add the carrot and celery, and do the same. Add the pancetta, if using, and fry until it releases its fat, then stir in the tomatoes, breaking them up with the spoon.

Stir in the tomatoes – break them up with a wooden spoon.

Once the beans are cooked, remove and discard the vegetables and rosemary, and scoop out a ladleful of the beans. Mash these with a little of their cooking water to make a paste, then stir into the soup with all the whole beans and enough of the cooking water to make a thick soup.

Let the soup simmer gently while you cook the pasta in salted boiling water in another pot until al dente.

Cook the pasta, mash a few of the beans, then add both to the soup with some butter. Serve with parmesan sprinkled on top.

Stir the drained pasta into the soup along with the butter, cover, take off the heat and leave to sit for five minutes. Season to taste and serve with a sprinkling of cheese.

• Pasta and beans: up there with beans on toast for comfort, or too much of a good thing starch-wise? Thick or soupy, borlotti or white beans, macaroni or spaghetti – how do you make yours, and what do you season it with?