Trim and finely chop the onion and mince the garlic; zest the lemon and reserve a small amount for garnish, then juice the lemon.
Heat the olive oil in a large deep skillet or sauté pan over medium heat.
Add the chopped onion and cook, stirring, for 2–3 minutes until softened.
Add the minced garlic and cook for about 1 minute until fragrant, stirring so it does not brown.
Pour in the broth and bring it to a simmer over medium heat.
Add the lemon juice and most of the lemon zest to the pan, then pour in the heavy cream and bring the sauce to a very gentle boil.
Add the uncooked gnocchi to the sauce, cover the pan, and cook over medium-low heat for about 4 minutes.
Remove the lid, stir the gnocchi, then add the peeled and deveined shrimp; stir to combine.
Cook uncovered on low heat, stirring regularly, for about 3 minutes or until the shrimp are opaque and cooked through.
Season the dish with salt and pepper to taste, then serve garnished with chopped parsley and the reserved lemon zest.