It starts off as greed or envy - one wants something someone else has. Then it's exciting to know that one got away with it (perhaps) and one wants more excitement ... one hardly ever thinks of the shame and the consequences of being caught.
If you ever find yourself in that situation (and most people do from time to time). Think of it as a chain - greed, excitement and (perhaps) guilt - more excitement and less feeling of guilt - ... and so on. You need to break the chain, so concentrate on seeing how misplaced the excitement is and seeing how you could get excitement (or happiness) legitimately. Simply telling yourself that greed, envy, theft and so on are wrong is a negative (but traditional) way of dealing with the problem. Trying to find the most positive solution always works far better.
The same technique can be applied to almost every addiction which works by seeking satisfaction or pleasure of some kind. It's the search for 'happiness' which is actually most in our control and responds best to reason.