Let's try this: If a businessman from, let's say China, was asked by Chinese intelligence, on multiple occasions, to gather information on subject "A" in the US - say quantum computers or Elon Musk's SpaceX - and then did so, multiple times, I think we would all agree that that person was working for Chinese intelligence. Or had "worked" for them. Even if he was not given money for it. Wouldn't we?
If it all hinges on whether he was financially compensated for these efforts then it's correct in the literal definition of work that he didn't "work" for Chinese intelligence. It's perhaps not, in the legal sense, perjury for him to say he didn't; but is it true? If so it's a rather narrow legalistic definition of work.
BTW, Carpenter states that Shaw said numerous times when asked that he had "no connections" with the CIA. I don't have the exact quote but if true then that's very difficult to defend.
Several things can be true at the same time (they often are): Shaw was a patriot, he was smeared by Garrison, he had nothing to do with the assassination, and he was misleading about his relationship with the CIA. Whether he perjured himself depends on what defines as work.