My friend gave me a magazine, but I [have/had] already read it.
If we're talking about the choice between "have" and "had" in this sentence, then we're talking about the choice between the present perfect and the past perfect. In this case, choose the past. The first clause uses the past indefinite (or simple past). The act of giving and the condition of having read both exist at the same point in time, and the two clauses should agree in tense.
My friend gave me a magazine, but I [had/∅] already read it.
If we're talking about the choice between "had already read" and "already read", then we're talking about the choice between the past perfect and the past indefinite. Here, the choice isn't quite as obvious.
Both the act of reading and the act of giving are in the past at the moment of speaking. However, even at the moment of giving (at the time when the moment of giving was the present) the act of reading remains in the past.
There are two things that exist at the same time. One is an action, giving the magazine. The other is a condition or state of being, having read the magazine. This condition is, of course, the result of an action that is further in the past.
This is the reason that the past perfect is used to indicate that one action took place before some other action in the past.
The act of reading happened first. The condition of having read continues from that action through the act of giving. The act of giving is in the past at the time of speaking or writing this sentence.
Express the act of giving in the past indefinite. Express the condition of having read in the past perfect. In this way, the tense of the two clauses will agree and will represent the same point in time, but the perfect aspect will imply an action of reading that occurred before the action of giving.