The answer is vicarious conditioning.
Vicarious conditioning (VC) refers to the phenomenon whereby, animals or humans acquire beliefs, attitudes and feelings towards a stimulus (something or someone) based on observing others' responses and reactions towards the stimulus. In VC, animals and humans do not learn through personal and direct exposure to a stimulus.