You will receive a merchant ID when you sign up for a Yahoo Product Submit account. Please note that a Product Submit account is not the same as a Yahoo! Paid Search account, or a general Yahoo! user account. You must have a Product Submit account in order to obtain your Yahoo! Merchant ID. Instructions on how to set up a Yahoo! Product Submit account can be found here: http://static.singlefeed.com/help_engine_3.html
Once you have created this account, log in. You'll find your Merchant ID on the first page.