This is the 11268th most frequent Russian word.
девизом
The Russian word "девизом" means "motto" in English (instrumental case).
Here, 'девизом' is instrumental case singular, indicating what 'her motto was'.
Её девизом в жизни было быть честной.
Her motto in life was to be honest.
In this sentence, 'девизом' again serves as an instrumental case singular describing what the book ends with.
Книга о успехе заканчивается девизом, который вдохновляет читателей.
The book on success concludes with a motto that inspires readers.
Here, 'девизом' represents the instrumental case describing the means by which difficulties were overcome.