Bring a large pot of water to a boil over high heat. Sprinkle generously with salt. Add the pasta and cook 1 minute less than the package instructions, about 5 minutes. Drain well, reserving 1/3 cup of pasta water.
Meanwhile, heat a large skillet over medium-high heat. Add the oil and shallots with 1/2 teaspoon salt and cook for 1 minute. Add the green beans and another 1/2 teaspoon salt. Cook, stirring often, until the beans are just cooked through, about 4 minutes. Stir in the peas and cook another minute to warm through. Add the cooked pasta to the skillet along with the reserved water. Top the bare pasta with the Parmesan and add the pesto. Toss well to coat. Dollop the ricotta over the top and serve.