Heat the oil in a large saucepan and fry the pancetta for 5 minutes until golden. Remove from the pan with a slotted spoon and set aside. Add the onion, potatoes, leek, garlic, rosemary and bay leaves to the pan and fry gently for 10 minutes until softened. Add the beans and stock, bring to the boil and simmer gently for 20 minutes, until the vegetables are tender.
Meanwhile, make the garlic and parsley oil. Heat the oil with the garlic and salt in a small pan and simmer gently for 3 minutes. Leave to cool, then stir in the parsley. Set aside.
Transfer half of the soup to a blender or food processor and purée until really smooth, then pour it back into the pan and season with salt and pepper. Stir in the clams or mussels and return the pancetta to the soup. Simmer gently until the shellfish are open, about 5 minutes (discard any that remain closed). Spoon the soup into bowls and drizzle with the garlic and parsley oil and serve with some crusty bread.