In a large skillet, heat ½ teaspoon of olive oil over medium heat. Add the pancetta and cook until it starts to crisp about 3-4 minutes.
Remove the pancetta from the pan and set it aside.
While you cook the pasta sauce, bring a large pot of salted water to a boil. Add the pasta and cook it until al dente, according to package instructions. Drain, reserving 1 cup of pasta water.
While the pasta cooks, add the rest of the oil to the pancetta pan and heat up once more. Add the thinly sliced onion, red pepper flakes, chopped garlic, salt, and black pepper. Sauté until the onion becomes translucent, about 2 minutes.
Add the green beans and cook, stirring occasionally, until they are tender but still crisp, for about 5-6 minutes.
Stir in the canned tomatoes, crispy pancetta, and basil leaves with the tender green beans. Cook on low-medium heat with a lid on for another 5-7 minutes until the mixture is heated through and the tomatoes are cooked. If the sauce seems too thick, add a bit of the cooking pasta water to loosen it.
Add the cooked pasta to the skillet with the green bean and pancetta. Toss everything together until well combined. Adjust the salt and pepper if necessary.
Serve the green bean and pancetta pasta while still hot, sprinkled with grated cheese and chopped fresh basil. Enjoy!