Preheat oven to 400 degrees F (200 degrees C). Line a baking tray with parchment paper and dust lightly with flour.
Lay puff pastry on a flat work surface; cut a 12-inch circle from each sheet. Transfer 1 circle to the prepared baking sheet.
Spread ricotta evenly over the pastry circle. Top with an even layer of pesto. Lay the second pastry circle on top. Set a small glass upside down in the middle of the circle.
Cut the circle, away from the glass, into 4 equal quarters. Cut each quarter in half, then each eighth in half, to make 16 equal strips. Remove glass. Twist strips twice, two at a time, in the opposite direction. Pinch ends together. Repeat with remaining strips to make a pinwheel shape.
Bake in the preheated oven until pastry is browned, 25 to 30 minutes.