David Tucker, for the prosecution, said Keith Appleton and Sean Webster planned to release the pigs in Ripon town centre, but had second thoughts and took them to Webster's house, but his wife refused to allow the animals in.
In desperation, the unemployed farmhands dumped the pigs in a barn. When interviewed by police the men denied involvement and claimed to have been drinking all day.
Yesterday Appleton, 24, and Webster, 27, both from Ripon, admitted stealing the pigs. They were ordered to do 150 hours community service and pay pounds 40 costs.