Place the shallots and peppers int a frying pan with the olive oil, cook over a gentle heat until softened and cooked.
Cook the spaghetti according to pack directions, drain and stir in the pesto sauce, shallots and pepper, season to taste.
Serve in bowls sprinkled with the basil.