It depends if your dog has ever tested positive for heartworm. If so then the monthly pill is better. Many people prefer the bi-annual shot because they are easier to remember. It can also be more cost-effective. Keep in mind that no medication is 100% effective. To ensure the meds are working, vets recommend bi-annual or annual testing. Since many of the heartworm meds prevent tick-borne diseases, many vets give combination tests.