The actress, who has joined forces with animal rights organisation People for the Ethical Treatment of Animals (PETA) India for the advertisement, has also asked fans to take care of sterilising the animals.
"Breeders, pet stores and people who don't sterilise their animals are responsible for all the animals who end up homeless," Sonakshi said in a statement.
In the ad, the "Dabangg" actress is seen sitting with her canine friend Bambi. The tag line to it reads: "Envision a World Without Homeless Dogs and Cats. Adopt a dog or cat from an animal shelter, and always get your animal companions sterilised".
The photograph has been shot by leading photographer Russi Modi.
Sonakshi and PETA India want all prospective animal guardians to avoid greedy breeders and pet shops, which only make the homeless cat and dog crisis worse and to adopt their animals from a shelter or take in a cat or dog from the streets instead.
"Every time someone buys a dog or cat from a breeder or pet store, a homeless animal roaming the streets or waiting in an animal shelter loses a chance at a home and a good life," added the 26-year-old.
The actress, daughter of veteran star Shatrughan Sinha, is a a long-time supporter of PETA India. Since her college days, she has been rescuing animals, including her beloved dog Nancy, whom she lived with for 14 years.