If you have a lot of heroes in your prison and you have a "big" attacking you and you need to shield really quick try this:
As long as you don't have anything building this will work. First, click on deconstruct on your prison, don't speed it up with gold though, then after it starts the count down (all heroes will be released) you should be able to shield then go back and cancel the deconstruction of your prison.
This tried and tested! Feel free to test when you capture farm heroes. Just remember don't speed up deconstruction with gold!
New: If you are about to attack and you don't want to capture any hero's, you can start the deconstruction before the attack and then cancel it when done!
Navi
(Courtesy of RR Spike and Ushuaia!)