We consider the problem of trying to change the behavior of a person by offering him a sequence of rewards, with each reward granted only if he performs the desired behavior to a certain degree. We develop a suitable cognitive model based on well-established psychological principles, and then use this model to devise a control algorithm that controls the person's attitude. By exploiting psychological dynamics to drive his attitude to a large enough value in finite time, the person's behavior can be brought to any desired level. This approach has the significant advantage that, at the end of the time interval, no reward is needed to maintain the desired behavior. We consider both open-loop and feedback implementations of the algorithm.