There is no way to program the 2006 - 2007 Chevy HHR by yourself.

You must take it to a dealer that has the proper equipment to program your remote for you.

However, you can save money by purchasing a replacement on your own and only paying the dealer to program, instead of buying the remote from them as well.