Step 1Preheat oven 180°C. Line a large baking tray with baking paper. Lay broccoli on tray in a single layer. Lightly spray with oil. Roast for 15–20 minutes, or until it is just tender. Cool.
Step 2Meanwhile heat oil in a non-stick frying pan over medium heat. Sauté onion for 3–4 minutes, or until lightly golden and softened. Add tomatoes, garlic and capsicum. Cook for 4–5 minutes, or until tomatoes have softened. Simmer sauce for 25–30 minutes, or until thick and rich. If needed, add 2–3 tablespoons of water to thin sauce. Keep warm.
Step 3Process roasted broccoli in a food processor until fine. Place in a large bowl with the ricotta, parmesan and egg. Season with pepper and stir until just combined. Gradually mix in flour; stir to form a soft dough which is firm enough to roll.
Step 4Divide dough into 4 pieces. Roll 1 piece out on a lightly floured surface into a 2cm-thick log. Cut into 2–3cm pieces. Leave gnocchi plain, or roll on the back of a fork to leave indentations. Set aside on a tray and repeat with remaining dough.
Step 5Drop gnocchi into a large pan of boiling water for 2–3 minutes, or until they float to the surface. Remove with a slotted spoon and transfer to serving plates. Top gnocchi with fresh tomato sauce, and serve extra shaved parmesan and basil leaves.