How did Shaver (1970) manipulate similarity in the defensive attribution study?
This article has several experiments included in it. These have different operational definitions of variables, and specifically differ in their definitions of "similarity". I'll assume you are talking about Experiment 3 where the hypothetical child is injured. From the end of Experiment 2 (p. 108, c. 2, first full paragraph):


  ... a third experiment was conducted in which perceived personal similarity was one of the dependent variables ... Thus, only severity of consequences was
  actually manipulated.


So for this situation (Experiment 3), similarity is actually treated as an outcome and is not manipulated.