Google Inc. will launch buy buttons on its search-result pages in coming weeks, a controversial step by the company toward becoming an online marketplace rivaling those run by Amazon.com Inc. and eBay Inc.

The search giant will start showing the buttons when people search for products on mobile devices, according to people familiar with the launch.

The...