Cook the pasta following pack instructions, then drain and keep warm.
Meanwhile, finely chop the onion and cut the roasted pepper into thin slices.
Heat the oil in a saucepan over medium-low heat. Add the onion and sauté for about 8 minutes until soft. Add the garlic, capers, oregano and chilli, and cook for another minute.
Stir in the tomatoes, season to taste, then bring to a simmer and cook for 20 minutes or so, until the tomatoes are tender. Add the roasted pepper slices, beans and olives, then cook for another 5 minutes to warm through.
Toss the pasta with the sauce and add the chopped basil or parsley leaves, then serve.