Animals on Shabbos
9. It is permissible to tell a Gentile to milk animals on Shabbos to relieve the discomfort that the milk would cause them (1). This milk is, however, forbidden to be [drunk and even to be] moved [by a Jew] during Shabbos (2). Rather, the Gentile should put it in a safe place.
Similarly, it is permitted to tell a Gentile to force-feed geese once during Shabbos, so that they do not suffer pain [from eating less than their normal amount] (3).
(1) There are three different principles which apply here:
a) Milking an animal on Shabbos is Biblically prohibited due to the Melacha called "Mefarek," , which basically forbids the extraction of a natural product from its natural container.
b) It is rabbinically prohibited to instruct a Gentile to perform prohibited activities on Shabbos for the sake of a Jew.
c) It is also prohibited to allow an animal to experience unnecessary suffering ("Tza'ar Ba'alei Chaim").
An animal's suffering overrides the prohibition against instructing a Gentile to perform forbidden labor on Shabbos.
(2) That is, the milk is "muktza." (See Mishna Berura 305:71).
(3) Geese which have been force fed over an extended period can usually no longer eat on their own. If a Gentile is unavailable, a Jew may do it, preferably through a minor.