They applied Pavlov's experiment on Booze rats and got them to trigger the booze delivery mechanism with simpler stimuli than extreme stress -
Initially, booze rats were farmed like chickens in Battery Cages. The battery cages restricted movement and kept the rats permanently positioned to deliver the booze to the appropriately positioned booze receptacles colored red. Electric current was applied every hour that forced them to shoot the booze straight into the receptacles.
Later, electric current was accompanied by a distinct ultrasonic whistle and followed by food until the booze rats started shooting the booze upon hearing just the sound. The booze rats that still required electric current after a few generations were not bred.
Finally, the Battery Cages were replaced with better housing at the request of Booze Rat rights/cruelty groups but Booze Rats never forgot to shoot the booze into the red receptacle when they heard the whistle. Now, free range organic Booze Rat booze is also available.
Note: Some farms have also done away with whistles. They have bred booze rats to shoot the booze into receptacles every 3 hours (in return for food) instead. Same principles, different techniques.