Preheat oven to 350F. Using an electric hand mixer or stand mixer with paddle attachment, cream together butter and brown sugar. Beat in corn syrup, egg, and vanilla. Next, mix in salt, baking soda, and cornstarch. Add flour; mix until fully combined. Add in M&Ms by hand or with stand mixer on low.