We consider a spectrum sharing scenario where a secondary transmitter (ST) communicates with its destination via a decode-and-forward secondary relay (SR) in the presence of interference from multiple primary transmitters. The SR harvests energy from received radio-frequency signals that include primary interference and uses it to forward the information to the secondary destination. The relay adopts a time switching policy that switches between energy harvesting and information decoding over the time. Under the primary outage constraints and the peak power constraints at both ST and SR, to determine the average secondary throughput, we derive exact analytical expressions for the secondary outage probability and the ergodic capacity, which characterize the delay-limited and the delay-tolerant transmissions, respectively. We also investigate the effects of the number of primary transceivers and the peak power constraints on the optimal energy harvesting time that maximizes the secondary throughput. By utilizing the primary interference as an energy source, the secondary network achieves a better throughput performance compared to the case where the primary interference is ignored for energy harvesting purpose. Finally, we consider a case where ST also harvests energy from primary transmissions and compare its throughput performance with that of the non-energy harvesting ST case.