This type of conditioning is known as operant conditioning. This is a way of conditioning that uses a stimulant to either encourage someone to do something or encourages someone not to do something again. In this case, the "shock" is a negative stimulant, encouraging the pigeon not to land on the wire again. After a few times of landing and getting shocked, it realizes that if it does not land on the wire, it will not get shocked.
A pigeon was shocked every time it landed on the telephone wire. After a few times of this, the pigeon learned not to land on the wire. It learned this by _____.