Cook pasta in a pot of boiling salted water until al dente. Drain and rinse. Set aside. In a large skillet, heat oil. Add onions and cook until translucent. Add garlic and cook 1 minute. Add tomatoes, beans, Italian seasoning, basil, and red pepper flakes.

Cook for 10 - 20 minutes or until mixture reaches desired consistency. Add any other of the optional ingredients. Heat through. Add salt and pepper to taste. Add pasta to the sauce in the pan or serve sauce over the pasta on individual plates.
Top with Parmesan cheese right before serving.