Toast nuts. Heat oven to 300°F. Spread almonds on a oven-safe frying pan and toast until golden, 5 to 7 minutes. Cool completely. Chop 1/4 cup of the nuts for garnish and set aside.
Start pesto. Combine remaining 1/4 cup of the cooled almonds, the oil, garlic, and salt in the bowl of a food processor (or Vitamix if you have one) fitted with the blade attachment. Start grinding the nuts on low speed until they start to break up then increase the speed to medium and keep processing until the mixture is a paste consistency. Add basil. Wash the basil leaves but don't dry—you want the leaves to be wet. Tear the larger leaves into smaller pieces and add to the food processor and pulse just enough to make a smooth sauce. If it is too thick, add a couple teaspoons of cold water. Taste and add more salt if needed.
Cook pasta and beans. Bring a large pot of heavily salted water to a boil. Once boiling, add rigatoni and cook according to package instructions. Add green beans during the last 3-4 minutes of cooking. Drain, saving 1/2 cup of the cooking liquid.
Toss. Scrape pesto into the pot you cooked the pasta in. Add the reserved water, pasta, and green beans. Toss to coat in the sauce.
Serve. Taste and season with more salt if needed. Serve in bowls topped with the remaining chopped nuts and a sprinkling of chile flakes.