In a hopeful manner.
"She smiled hopefully at him as he walked toward her."
In plain English: Hopefully means that you think something good will happen, but it is not a promise that it definitely will.
"Hopefully, we will finish the project on time today."
Usage: Use "hopefully" to describe doing an action with optimism or in a hopeful manner. Avoid using it at the start of a sentence to mean "I hope," which is often considered grammatically incorrect in formal writing.
The word hopefully is formed from hopeful plus the suffix -ly. Its modern usage as an adverb meaning "it is to be hoped" likely entered American English as a direct translation of the German word hoffentlich.