Check to see if your local library is connected to a network of ebooks. Then it is free and legal. Your taxes pay for the books.

Otherwise most authors are willing to let you read the first...