Like in the rest of Pokemon video games, it shakes up to 3 times when you catch it.
Each throw has an individual chance. If you throw and 2 shakes occur but the Pokemon escapes, that has no effect on your next throw -- you might catch it, or it might shake once and escape.
In other words, I don't consider you to gain any useful information about it at all.