Tire them out
Pets are more likely to hold still and tolerate a photo shoot when they're worn out (or more likely sleepy, if you're dealing with a cat). Before shooting posed portraits of your dog, be sure to take it on a long walk or run. If you have an especially hyper pup, look into canine-calming treats.
Photo credit: Poon Watchara-Amphaiwan