based on the description, this experiment is most likely an aversive conditioning Experiment.
Aversive conditioning experiment is created to associate a substance/behavior that wanted to be eliminated with some negative stimuli (such as pain or nausea). This will train the brain to reject the existence of that substance/behavior in our body.