Again, I find myself at odds with others over the definitions - for they are many - of racism.
Paki, to me, is always an abbreviation of Pakistani, in exactly the same way as Rob is of Robert. There is simply no more to it than that.
However, if I may slip into the mindset of those who think otherwise, for a moment: in that frame of reference, then, the assumption has to have been made that Paki or Pakistani is a form of insult because either is, somehow, a definition of belonging to an inferior breed of human being, something not purely English, or whatever one prefers to choose as standard of reference of measure of what constitutes a worthy human being.
Frankly, it is simply silly to make such an assumption - I trust - and so to avoid that, one has to accept that Paki and/or Pakistani are nothing more or less than the names by which we recognize people from a particular country.
Rob aka Robert.