Coat the beats in olive oil, then season with salt and pepper. Bake the beets for 30 minutes, with the peels on. Allow them to cool, then peel.
Puree the beets in a food processor or with a stick blender. Add ricotta cheese. Stir. Add egg, grated Parmasan cheese and flour. Stir.
Flour your hands and work surface. Form a small ball with the dough. It'll be a bit tacky.
Form the dough into a log in your hands, then set it on the work surface and roll it gently along the table with your hands, it into a long, thin roll.
Cut the log into bite-sized pieces. Sprinkle with flour and toss with flour.
Boil the gnocchi at a low boil for 2-3 minutes, or until the gnocchi start to float.
Toss them in a skillet with melted butter and chopped pistachios. Saute for about 5 minutes, until the butter starts to sizzle and brown.
Once the butter is browned, transfer the gnocchi to a plate, drizzle with the butter. Spoon the pesto onto the plate. Top with shaved parmesan cheese, if desired.
Notes
Gnocchi can be frozen before boiling. Space them out on a plate and freeze for 5 minutes before putting them all into a container to freeze. This keeps them from sticking together.