Cook the gnocchi according to the package directions. Drain and return them to the pot.
Meanwhile, bring a large saucepan of water to a boil and add 1 tablespoon salt. Add the green beans and cook until tender, 3 to 4 minutes; drain.
Add the pesto and cream to the gnocchi and cook over medium heat, stirring, just until heated through, 2 to 3 minutes.
Divide gnocchi among bowls and top with the green beans, ricotta, and ¼ teaspoon pepper.