Peel the carrots, clean the celery stalks, wash both and cut into slices. Clean and wash spring onions and cut them into rings. Wash and roughly dice the tomatoes. Peel garlic and chop finely. Wash the thyme and remove the leaves.
Heat the oil in a large pot. Fry the carrots, celery, spring onions and garlic in it. Add tomato paste and sauté briefly. Add tomatoes and thyme. Season with salt and pepper. Add 1.5 l water, bring to the boil and stir in the stock. Simmer everything covered for about 10 minutes.
Cook the pasta in boiling salted water according to the instructions on the packet. Rinse beans in a sieve and drain. Wash basil, cut leaves into strips. Drain the noodles. Heat beans, noodles and basil briefly in the soup. Season to taste with salt and pepper. Serve with pesto.