Heat the oil in a frying pan that has a lid, then soften the onions, jalapenos and garlic for 5 mins. Stir in the tomatoes, red chilli flakes and sugar, then bubble for 8-10 mins until thick.
Using the back of a large spoon, make 4 dips in the sauce, then crack an egg into each one. Put a lid on the pan, then cook over a low heat for 6-8 mins, until the eggs are done to your liking. Scatter with the basil leaves and pecorino. Serve with crusty ciabatta and a glass of freshly squeezed orange juice.