If it was me, I think I'd say something like:
If you've been given this PDF book by a friend, or have found it on an Internet site somewhere, you might not be aware that it's actually a commercial (i.e. non-free) product. If you fall into this category, and you like our book and are going to carry on using it, we'd be grateful if you would legimatise your copy by going to web address and paying the $5 purchase cost. In return, you'll get all the benefits of being a registered user including free updates and corrections and we'll also be able to continue to produce products such as this.
That way you're not saying that it was okay for them to acquire it in this way because it's couched in terms of "someone else might mistakenly have given this to you / distributed this, and you might not therefore have been aware that you were supposed to pay for it". It's hopefully a plight version of saying: excuse me, were you planning on paying for that?