Qralloq says:
While The Trove does provide fine sharing of the books, these are not authorized sharing and there is undoubtedly a copyright violation issue.
Paizo does provide legal online access to the ruleset through their PRD, at http://legacy.aonprd.com/
Qralloq speaks the truth. Also, as someone who has played a lot of Pathfinder, all you'd really need is the core rule and a bestiary.The core game is easily robust enough to keep you going for a loong time.
As an aside, the ink Qralloq indicated has both the 1e and 2e rules for Pathfinder,as well as the core game for Starfinder.