Bring a pot of water to a boil. Submerge the basil and spinach leaves in the water for ten seconds, remove and shock in ice water immediately. Remove from the ice water and squeeze very, very dry. Rough chop with a knife.
Place the chopped greens in a food processor along with the egg and a little salt and pepper and chop until a paste forms and no large pieces remain.
Place the paste in a bowl along with the ricotta and mix well. Check seasoning, then add the flour. Mix gently until all the flour is incorporated but be careful not to over mix.
Bring a large pot of salted water to a boil. Roll the dough into strands about ¾-inch thick and about one foot long on a well-floured cutting board. Cut with a sharp, clean knife in pieces about ¾-inch wide.
Drop the gnocchi a few dozen at a time into the boiling salted water. After about one minute, they should float. Remove the gnocchi from the water and place on a pan and drizzle with a little extra virgin olive oil. Continue the process until all of the gnocchi are done. Keep the water hot.
Warm a large sauté pan and melt the butter and at the same time drop the gnocchi back in the boiling water for about 30 seconds. Remove the gnocchi from the water and place in the pan. Toss with the butter, adding a few tablespoons of the cooking water to the pan.
Remove from the heat, portion into bowls or on plates and sprinkle with freshly grated Parmesan cheese.