Wash the cockles and clams well and let them stand for at least 3 hours in salt water. Change the water regularly to eliminate the sand.
In a frying pan with a little olive oil, fry the garlic and parsley, add a small piece of chilli cut into rings and add the shellfish. Let cook for 5 minutes. When the shells open, they are ready. Add the can of diced tomatoes and 1 glass of white wine. Simmer for 5 minutes. Let cook for another 5 minutes.
In the meantime, boil water in a saucepan, add a handful of coarse salt and plunge in the spaghetti, cook for 7 to 8 minutes and drain.