This is an "Ema". "Ema" are small wooden plaques on which Shinto worshipers write their prayers or wishes. The ema are then left hanging up at the shrine, where the kami (spirits or gods) receive them. They bear various pictures, often of animals or other Shinto imagery, and many have the word gan'i (願意), meaning "wish", written along the side. In ancient times people would donate horses to the shrines for good favor, over time this was transferred to a wooden plaque with a picture of a horse, and later still to the various wooden plaques sold today for the same purpose.
Ema are sold for various wishes. Common reasons for buying a plaque are for success in work or on exams, marital bliss, to have children, and health. Some shrines specialize in certain types of these plaques, and the larger shrines may offer more than one. Sales of ema help support the shrine financially.