After having several heart attacks and being obese I decide to buy a treadmill but when I run I get splitting shin pain how do I fix this?

You need new or. Different shoes that will help properly line up your foot, ankle and knees in order not to strain this area. My best advice is to go to a specialty store, specializing in marathon/ long distance running gear. Have your feet evaluated, then purchase the brand of running shoe that fits your feet properly, then get on that treadmill and start slow!