I am assuming the one you have is the later black and chrome version and the following is based upon that. The earlier chrome one is similar but no doubt has differences. I have not had to open that one up so you may need others guidance though I am sure it is simple as is this one.
As I mentioned and others have too this lens is very easy to open up (and more importantly put back together - that's the bit that foils most "lens technician" beginners but here it is simple as long as you are systematic and make sure you note which way lens elements face as they are removed.)
Although this video focuses on cleaning lens elements, it effectively shows you how and what tools you need to open the lens and get to the bits you need to access. A lens spanner is not strictly necessary I suppose but is highly, highly advisable. They are cheap on eBay and worth their weight in gold as trying to loosen a tight retaining ring without one can result in a scratched lens element, especially if you are as clumsy as I am. You will also need small jeweler's screwdrivers - available cheaply just about everywhere.
https://www.youtube.com/watch?v=HX93S2iuG5E
Open it up just as he shows you then right about 3.00 minutes in, you will see him unscrew a retaining ring at the rear of the camera allowing the optical block to drop out at the front of the lens - place a hand at the front to catch it. At 3.15 as he removes the block you can see the bronze coloured shim around the neck of the rear portion of it. That's what you need to adjust by inserting an additional thin shim to supplement the one that is there. Small increments are the way to go. Of course if you have metal working / machinist skills you could machine a new one up and substitute that for the existing one. My 50mm f1.2 was so far out (front focusing) that I cannot imagine how it got that way if it were not a poorly done helical reassembly. But my camera guy assured me it was not. In which case I cannot imagine how it ever left the factory in that condition - did a company like Canon really have a quality assurance issue back then??????? Someone else may have a theory or better still information.
After reassembly it is a matter of testing the lens on your camera to see if it's now focusing correctly or needs further adjustment . Some trial and error supplemented by patience is required but as others have said this is infinitely more simple on a digital camera as you can check outcomes so easily compared with a film one.
I used the following process to check the rangefinder on my M8 when it went out of "whack". The same can be used to check your lens. To check its focus point , I used a black marking pen to mark out a piece of board about a meter long (but length is not important) with a clearly marked central focusing point and marks at 2 centimeter increments ahead of and behind that (no need to go the full length of the board). I numbered each of these so I had a clear estimate of how far off the lens is from the central aiming point. I laid this on the floor and set my camera on a tripod exactly 3 meters from the focusing point (you could use another distance but I always choose one which is also marked on the lens distance scale. That way I can focus in two ways - by the rangefinder and by the distance scale - this is essential only if you are checking rangefinder accuracy. But its useful as if actual focus point coincides with the distance at which you are shooting as indicated by the lens then its and extra indication that everything is now kosher) . I don't think the sensor plane is actually marked on the body of the M8 but had to estimate this. The camera points at about 45 degrees give or take. Not sure if with this angle the distances marked ahead and behind the focus point are still accurate due to parallax, but it was good enough to estimate what changes were needed. Try focusing wide open then stopped down to a moderate working aperture so you also know if there is focus shift between these. Though I would probably suggest adjusting the lens to its widest aperture in practice. It is just useful to know the extent to which this changes as you stop down when out in the field so you can manually adjust your point of focus accordingly.