There's debate whether chilling them is any more humane than boiling them alive. Electrical shock works but that might not be a viable option for a home chef.
Related: Shrimp Welfare Project
There's some philosophical debate about whether shrimp farming is even a bigger moral issue than factory farming pigs. It could be argued that donating to this organization to give the shrimp a painless death may give the most bang for your buck when it comes to donating to charity from the point of view of reducing suffering.