No, having a website is not necessary, although it would help you to have one. Remember that your audience must always click your affiliate link when making a purchase, for the sale to be attributed to you.