Friend or Fiction by Abby Cooper
From Charlesbridge Publishing:
The best friends are the ones you make yourself . . .
Twelve-year-old Jade wishes her family would leave their no-name Colorado town already–everyone else does, including every friend Jade's ever had. But now that her dad's been diagnosed with liver cancer, they're not going anywhere. So Jade makes a friend who won't ever leave her: Zoe, the best best friend anyone could imagine, who lives in the pages of her notebook.
When an experiment gone horribly right brings imaginary Zoe to life, Jade is thrilled. But the strange power she wields over Zoe scares Jade, as does Zoe's increasing popularity. Is it okay to have a friend who has to do what you want? Is Jade really ready to share Zoe with the world?