The stage directions in Act 2, Scene 2 of Shakespeare’s Hamlet say “Enter Hamlet, reading a book”. Which reveals that Hamlet is a young man who is both intelligent and easily absorbed. A young man who is slow to show passion, and slow to be stirred into action. This is all we can sensibly learn from the book, and to try to make it real, by speculating about its title and contents, serves no useful purpose.
Douglas Adam’s The Hitchhikers Guide to the Galaxy, although an actual book, is also the title of a fictional electronic guide book in the story, which represents “the standard repository for all knowledge and wisdom”, for civilizations across the galaxy. The fictional guide book serves as the basis of the plot for the actual book.
H. P. Lovecraft’s Necronomicon, is a fictional ancient grimoire by Abdul al-Hazred. Lovecraft refers to it in several short stories and novellas, but is always sparing with the evil knowledge he reveals.
George Orwell’s 1984 contains The Theory and Practice of Oligarchical Collectivism, by Emmanuel Goldstein. It is an illegal book, which explains the totalitarian society and the doublethink it is based on. It is known simply as The Book.
Isaac Asimov’s Foundation Series includes The Encyclopedia Galactica. During the series, we discover that The Encyclopedia exists solely to isolate skilled scientists on a remote planet, in order in the long-term to re-establish the empire.
In P.G. Wodehouse’s short story Jeeves in the Springtime, the fictional romance novelist Rosie M. Banks provides All for Love; A Red, Red Summer Rose; Madcap Myrtle; Only a Factory Girl; and The Courtship of Lord Strathmorick.
Fictional books, often with fictional authors, provide the author with a way to shine further light on the current characters and circumstances. They can enhance the realism by providing background details, or simply have a title which provides a good joke. Some fictional books even have a life online, through dedicated web sites. Now I just need to create a fictional book in one of my own stories!