Prepare the sauce: heat the olive oil in a non-stick frying pan. Add the garlic, onion, bell pepper and cook over medium heat until soft, not brown, about 4 minutes.
Stir in the white beans and cook for 1 minute. Add the vegetable stock, half the parsley, the pepper flakes, and salt and pepper to taste. The sauce should be highly seasoned. Simmer until the beans are quite soft. Coarsely mash half the beans with a fork.
Cook the spaghetti in a large pot in 4 quarts rapidly boiling salted water until al dente, about 8 minutes. Drain well. Meanwhile, bring the sauce to a boil. Transfer the spaghetti and bean sauce to a large shallow bowl and mix well. Sprinkle the spaghetti with the remaining parsley and serve at once with freshly grated cheese on top.
Adapted from Steven Raichlen, "Healthy Latin Cooking"