WD5000AAKX iMac

Do you happen to know if the WD5000AAKX would work in an iMac. There are 8 pins on this one. But, a lot of the iMac’s 2009-2011 have 4 pins. If so do I plug it into the top or bottom?

Sorry I have looked everyone and can’t find the answer.