Boil penne rigate in the slightly salted water until cooked.
Prepare the sauce. Mix basil, garlic, Parmigiano, 3 tablespoons of water, 2 tablespoons of oil, 1/4 teaspoon of salt and the same amount of pepper in the blender until smooth.
Heat 1 tablespoon of oil in a large frying pan, pour onion and fry until golden color. Add the beans to the pan, cook and stir for 7 minutes.
Put the pasta in the frying pan to the beans, add tomatoes and sauce. Mix well and serve pasta with beans and tomatoes immediately.