Step1
Listen to the opening of the song numerous times. The more you listen to it, the more it will become ingrained in your memory. This helps with the timing.
Step2
Get yourself a guitar pick comfortable for your strength and skill level. A pick around .88 mm, should in theory, work the best. The extra heavy picks will not help achieve that Slash sound, though.
Step3
Learn the eight notes. The opening riff repeats a pattern of eight notes, with the first note changing each of the four repetitions, and the other seven notes remaining the same. Tablature for the first repetition looks like this:
E----------------15----14---
B-----15--------------------
G--------14-12------14----14
D--12-----------------------
A---------------------------
E---------------------------
Step4
Practice that musical phrase until you can do it without looking or are extremely comfortable with it. Since you will essentially be repeating the same phrase, four times, work your fingers into the easiest configurations.
Step5
After playing the first repetition, the second repetition begins with the 12th fret on the G-string (the same fret as the first time, but one string higher) and repeats the same seven notes as the first time.
E----------------15----14---
B-----15--------------------
G--12----14-12------14----14
D---------------------------
A---------------------------
E---------------------------
Step6
The third repetition begins on the 14th fret of the D-string and then repeats the same seven notes.
E----------------15----14---
B-----15--------------------
G--------14-12------14----14
D-14------------------------
A---------------------------
E---------------------------
Step7
The final repetition repeats the same entire phrase from Step #3, starting on the 12th fret of the D-string.
This riff follows the pattern of A-B-C-A, where the first phrase is repeated to start and end the riff, with two slight variations in between.