Do a seach on the forum on share milking as this has been a topic before.
(Note share milking or sharemilking can also be another concept in which the dairy farm is operated by a third party for a percentage of the milk realized, sometimes with the eventual ownership of the operation. This started out in New Zealand, but is used occasionally in the U.S.)
I believe it is
www.realmilk.com which looks at the legal consideration. Essentially if you charge by the gallon/liter you are selling raw milk retail. A true share milk agreement must reflect the actual costs involved and the participants get a certain percentage of the typical production of that cow.
I'm pulling numbers out of the air for illustration purposes only.
Say you had a milk cow worth $2,000. You sell ten shares of that cow for $200 each. Now say the cow of her nature produces five gallons per day. On a daily basis then each of the ten users would be entitled to one-half gallon or no more than 3.5 gallons per week. If they are allowed to purchase more then you are selling milk from non-share cows at retail. When she is dry none of the share owners would get any milk.
(Added: If a cow produced more milk than the share holders could use, then technically the farmer would have to buy it back from them as the share cow belongs to them. The farmer is just acting as caretaker.)
A share milk agreement must also realistically reflect the maintenance cost of that cow. Say it is $100 per month excluding labor and $100 month for labor. Each should have to pay then a $20 per month maintenance fee. The farmer's profit would be in his labor cost.
The milk should not be sold on a unit basis, but rather free after paying the initial buy-in and monthly maintenance.
Techically a calf from that cow belongs to the share holders, although the farmer might be able to charge AI or a stud fee against the maintenance cost. If the calf is sold, the net proceeds belong to the share holders. If the cow dies the loss should be strictly the share holders. If the cow is culled the net proceeds should be divided among the share holders or used to offset the cost of a replacement.
The same basic concept would apply to a herd share agreement to where you, in effect, buy into the herd and then get milk from the bulk tank. Here again, a share holder should not receive more than what their buy-in would permit and should make a reasonally prorate monthly payment towards feed and maintenance.
I suspect technically a separate records book would have to be kept on the share cows as if it were a stand alone operation. For example, if a farmer had 40 cows and ten are on share milking, then the costs associated with the 30 should go against his farm account and the costs associated with the 10 should go against the share milking account. They would pay taxes separately. For example, they may show a loss with the 30 and a profit with the ten.
Remember Al Capone didn't go to prison for any of the crimes he may or may not have committed, but rather for evasion of income taxes on the profits thereof.
Some folks may sell raw milk as for pet use only. However, it would be considered as pet food and that is also regulated in some states from what I understand.