Scrub the clams, discarding any that stay open when tapped sharply.
Place the clams into a pan over a high heat. Add two tablespoons of water, cover with a lid and cook for 3-4 minutes, or until all the shells have opened. Discard any clams which have not opened after five minutes.
Remove the clam flesh from the shells and dip them quickly into their cooking water to rinse off any sand. Strain the clam juices from the pan through a sieve lined with muslin or kitchen paper and save the liquid.
Heat the olive oil in a pan over a medium heat. Add the garlic and fry until the garlic begins to colour, then add the anchovy paste and parsley and stir-fry for about 30 seconds.
Add the chopped tomatoes and the strained clam juices (if you are using a jar of clams, use the brine from the jar). Bring to the boil, then reduce the heat and simmer for 20-25 minutes.
Cook the spaghetti according to packet instructions and drain.
When ready to serve, add the clam flesh to the tomato sauce and stir well.
Mix the sauce into the cooked spaghetti.
To serve, spoon the sauce and spaghetti into bowls.