As hawk said. Boiling water first to get the original shape as close as you can. Then you can use a number of methods to glue. If you have two pieces that go back together with a good fit, I use foam friendly contact adhesive. Squeeze some onto one piece then push them together for a few seconds to cover both parts, then take them apart, wait a minute or so and then stick them together. Super strong bond and lighter than using hot glue. If the parts don't match togther well, then hot glue is the foam builders best friend.