Preheat the oven to 200°C (390°F) and line a baking tray with parchment paper.
Peel the shallot (or 1/4 red onion) and the garlic cloves, then place them in a food processor with the parsley.
Pulse until the mixture is finely chopped, then add the lemon juice, softened butter, salt and black pepper and process until smooth and well combined.
Divide the butter mixture roughly into 4 equal pats using a spoon and set them aside.
Trim the thinner pointed end off each chicken breast to make a more even square-shaped piece; reserve the trimmings for another use.
Lay one sheet of defrosted puff pastry on a board (keep it on its dividing paper if easier). Place a chicken piece in the center of the pastry.
Spoon one pat of the garlic-parsley butter onto the top of the chicken, then gather the pastry up and pinch or gently squeeze the edges to form a sealed pouch.
Transfer the sealed parcel to the prepared baking tray and repeat with the remaining chicken, butter pats and pastry sheets.
Crack the egg into a small bowl and whisk with a fork to make an egg wash, then brush the outside of each parcel.
Bake the parcels for 25–30 minutes until the pastry is golden brown and the chicken is cooked through.