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 among bowls and top with the green beans, ricotta, and 1/4 teaspoon pepper.
Substitution: If you can't find gnocchi, try this quick and easy pesto and cream sauce on pasta. Frozen peas are a fine stand-in for green beans.