Put a large pan of water on to boil. Add the salt and cook the pasta until al dente. In a small frying pan, heat the oil over a medium heat and add the bacon. Fry for a few minutes until crispy. Add the chilli and garlic and fry for a few minutes more. Add the tomato and cook until the tomato starts to break down. Add a couple of tablespoons of the pasta cooking water to the sauce and mix through. Add the basil right at the end. Taste and add black pepper and salt if needed (this will depend on the saltiness of your bacon).
Drain the spaghetti and add to the sauce. Mix well and serve with the Parmesan cheese grated over.