For the pesto:
- 1/4 cup pine nuts or walnuts
- 2 cups tightly packed fresh basil leaves
- 2 or 3 garlic cloves
- 1/4 cup grated pecorino sardo or Parmesan cheese
- 1/2 cup extra-virgin olive oil, or as needed
- Salt and freshly ground pepper, to taste
For the soup
- 1/2 cup dried small white beans or 1 can (15 oz.) white beans
- Salt, to taste
- 2 Tbs. olive oil
- 2 yellow onions, diced
- 1/2 cup diced pancetta
- 3 carrots, peeled, halved lengthwise, if large, and thinly sliced
- 2 celery stalks, diced
- 3/4 lb. tomatoes, peeled, seeded and diced
- 5 to 6 cups water or chicken broth, or as needed
- 4 small new potatoes, unpeeled, diced
- 2 zucchini, halved lengthwise and sliced
- 1/4 lb. green beans, trimmed and cut into 1-inch lengths
- 2 cups chopped Swiss chard (optional)
- 1/4 lb. macaroni or small shells
- 2 Tbs. extra-virgin olive oil
- Freshly ground pepper, to taste
- 1/4 cup grated Parmesan cheese
To make the soup, if using dried beans, pick over and discard any misshapen beans and stones. Rinse, drain and place in a pot with water to cover by 2 inches. Bring to a boil, boil for 2 minutes, then cover, remove from the heat and let stand for 1 hour. Drain and return to the pot with fresh water to cover by 2 inches. Bring to a boil, reduce the heat to low, cover and simmer until tender, 45 to 60 minutes. Add salt during the last 10 minutes of cooking. If using canned beans, drain and rinse well.
In a large soup pot over medium heat, warm the olive oil. Add the onions and cook, stirring, until softened and translucent, about 10 minutes. Add the pancetta and cook, stirring, until tender, about 5 minutes more. Add the carrots and celery and cook, stirring, until beginning to soften, just a few minutes. Add the tomatoes and enough water to cover amply. Bring to a boil, reduce the heat to low, cover and simmer until the tomatoes break down, about 10 minutes.
Meanwhile, if desired, place half of the white beans in a food processor or blender with a little of the cooking liquid or, if using canned beans, a little broth. Puree until smooth.
Add the potatoes, zucchini, green beans, white beans (including pureed, if using), Swiss chard (if using) and pasta to the pot and simmer until the vegetables and pasta are cooked, about 15 minutes. Stir often to prevent sticking. Swirl in the 2 Tbs. extra-virgin olive oil. Season with salt and pepper.
Remove from the heat and stir in the pesto. Ladle into warmed bowls and serve immediately. Pass the Parmesan at the table.