Son of Dex’s reply was accurate as far as it went, but it left out so much.
FRANKENSTEIN was originally published anonymously in 1818; Mary Shelley’s name did not appear on it until the 1831 edition, which appeared years after Percy’s death. Presumably, he was past being worried about having his name attached to “something as paltry…as a novel.”
I don’t think anyone would suggest that Mary was simply robbing her husband’s grave by taking credit for his work; if anything, the commercial value of the book would have been increased by crediting it to him. Mary was, after all, a widow with limited means at this time, so anything that would increase sales of the book would have been an advantage.
As for the rumor of Percy having authored the book, he helped Mary find a publisher and assured the publisher that he would look over the work of “his friend” (as he referred to Mary), in order to correct “such few instances of baldness of style as necessarily occurs in the production of a very young writer.” So no doubt he did offer suggestions and make corrections, but it would be a mistake to take this as evidence that he really wrote the book himself.
In her preface to the 1831 edition, Mary Shelley herself gave Percy credit for assistance in turning her inspiration for a tale into a full-length novel, but she took full credit for the writing: “Shelly urged me to develop this idea at greater length. I certainly did not owe the suggestion of one incident, nor scarcely of one train of feeling, to my husband, and yet but for his incitement, it would never have taken the form in which it was presented to the world. From this declaration I must except the Preface. As far as I can recollect, it was entirely written by him.”
In other words, Percy acted as a sort of editor-agent, helping her get the manuscript in shape so that it could be published. Because of his great reputation as a poet, some would like to construe this as evidence that he was a collaborator rather than an editor, but there is nothing substantial to support this.
One should perhaps add that the other classic tale to emerge from that haunted summer in Switzerland, John Polidori’s “The Vampyre,” was also published anonymously, and it was erroneously credited to Lord Byron. Seems like critics of the day were overly eager to bestow credit for Gothic horrors onto romantic poets.