All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
This matter depends on the system of the bookstore. If it allows borrowing books and taking them out of the bookstore— which is very unlikely in the case of books intended for selling— then it is permissible for your friend to lend you the books to benefit from them. He has to seek the owners’ permission to allow you to read their books. If they do not permit this or if the system does not permit it, then it is impermissible for you to benefit from them without permission because it is impermissible to make use of something without its owner’s permission.
Allaah Knows best.