The ReRAM is a device, not a via. So its terminals cannot be shorted. In magic's way of doing things, the ReRAM works best if the "reram" device type is attached (electrically connected) to one of its terminals; whether it's the top or bottom is arbitrary. I opted to have magic treat "reram" as connected to metal2.