Drain ricotta in a sieve over a bowl. Cover and chill overnight.
Squeeze liquid from spinach and mix with ricotta, parmesan and egg in a bowl. Season with salt and pepper then stir in flour until mixture comes together to form a soft, sticky dough.
Divide dough in half and, on a lightly floured surface, roll halves into a log shape about 40cm long. Cut logs into 2cm pieces. With lightly floured hands, roll pieces into oval shapes. Place on a paper-lined tray.
Carefully drop the gnocchi, one by one, into a large pot of salted boiling water. When they rise to the surface, cook for another minute. Use a slotted spoon to remove gnocchi and transfer to a warmed plate with 2 tablespoons of melted butter to stop them sticking. Keep warm.
Melt remaining butter in a frying pan over medium-high heat. Add walnuts and cook until the butter turns a nut-brown colour.
Add sage leaves. Add lemon juice (it’s gonna spit a bit!) and stir.