/run BuyMerchantItem(1) /click StaticPopup1Button1
Replace the (1) with the slot the item is located on the vendor.