How to Write a thank you for a gift certificate?

Sort of the same way you would for a specific gift. You can thank the sender for their thoughtfulness, maybe compliment then on giving a gift certificate as you're not sure what you want but look forward to checking out what's available in the store. If you know what you'll be using the certificate for, you could let them know what it is and that you'll be thinking of them when you use it.