Introduction to ring theory?
Solution 1:
Atiyah-Macdonald has been the best introduction to commutative algebra from the moment it was published in 1969.
Actually I think it is one of the most extraordinary textbook ever published in all of mathematics .
It is exactly 128 pages long, hence also one of the thinnest mathematics books on the market, but contains a mind-boggling quantity of material.
It starts with the definition of a ring (!) on page 1 but already in the exercises to Chapter 1 you will find a self-contained introduction to affine algebraic geometry, both classical and scheme-theoretic (and as an aside, remember that schemes were very new in 1969).
The book calmly goes on to chapter 11, the last one, where different definitions of dimension are given but proved to be equivalent.
You will also learn in that chapter about Hilbert functions and regular local rings, two notions which play a great role in algebraic geometry.
I won't even try to summarize the other chapters: suffice it to say that every basic notion in commutative algebra is covered: the Nullstellensatz for example is proved (or given as an exercise with hints) several times.
And the most remarkable feature of the book is that every proposition is proved, crisply but completely, without cheating or resorting to hypocritical shortcuts like "it is easy to see..." or "it is left as an exercise ..."
There are other good books on commutative algebra: Bourbaki, EGA, Eisenbud, Patil-Storch, Zariski-Samuel, ... but they are probably too advanced for a beginner, whom they might discourage rather than help.
I advise you to to use them as reference books once you have studied a reasonable part of Atiyah-Macdonald.
Good luck!
Solution 2:
Another remarkable book is Miles Reid's Undergraduate Commutative Algebra.
It is quite elementary (as the title indicates) and very short: 153 pages.
It is written by a renowned algebraic geometer for budding algebraic geometers.
It is chock full of pictures showing how to interpret geometrically algebraic notions: just look at the frontispiece of the book, which you can see in the link I gave above.
That frontispiece is a very realistic picture of a module $M$ lying over its base ring $R$, illustrating in an amazingly visual way the maximal points of the support of $M$, the stalks of $M$, the generic point of $R$, etc.
Already in Chapter 0 (called "Hello!": the author has a very friendly and amusing style) you will find pictures of the cuspidal cubic and of $\operatorname {Spec} \mathbb Z[\sqrt -3]$, hinting at the amazing synthesis between geometry and arithmetic permitted by scheme theory.
In a nutshell, that very elementary book exactly addresses the OP's wish to learn ring theory "with a view towards algebraic geometry" .
Edit
Since I have also recommended Atiyah-Macdonald's book, how do both books compare?
Here is Miles Reid's point of view (page 12):
"[Reid's] book covers roughly the same material as Atiyah and Macdonald, Chaps. 1-8 but is cheaper, has more pictures, and is considerably more opiniated.