Preheat the grill to high. Heat the oil in a large frying pan over a medium heat. Add the onion and pepper and cook, stirring, for 5 minutes. Remove from the heat.
Meanwhile, bring a large pan of water to the boil. Add the gnocchi and cook for 2 minutes. Drain, then tip back into the pan. Stir in the pasta sauce, the cooked onion and pepper, and most of the basil. Heat for 2 minutes, until the sauce is heated through.
Pour into a 1-litre baking dish, then scatter over the breadcrumbs and mozzarella. Place under the grill for 3 minutes until the cheese is melted and the breadcrumbs are toasted. Scatter with the remaining basil to serve.