It is very important that the choux pastry can set fully in the oven. If you take it out too soon, it won't yet be strong enough to hold onto itself. Instead, it will collapse! So, next time, bake the choux pastry for a little longer. In the image below you can see what a mere 7 additional minutes in the oven can do. The choux bun on the right-hand side was taken out too soon. It collapsed. The other two don't just have a nicer browner color, they are also firm enough to hold onto their shapes!