What is it called when you turn to a random page in a book, pick out a random passage and go by the underlying philosophies?
It's called Bibliomancy
In bibliomancy, you set a book on its spine, let it fall open, and randomly pick a passage without looking. Christian bibliomancers use their Bible (One story, hopefully apocryphal, recounts a Christian woman randomly choosing Matthew 27, verse 5 in the New International Bible : "Then he went away and hanged himself." She gave up the practice of bibliomancy that day).
Actually, Deuteronomy forbids this and other forms of divination, so the practice is difficult to defend from a Judeo-Christian viewpoint. Bibliomancers in other religions use their own holy books, and irreligious bibliomancers just use any book they find insightful.