To be honest, I'm not sure about the difference between operators and functions myself, but what I need to do is create something very similar to the shop_account_view_gui function, and since that is a function, I figured that that's what I need. :)
Thanks a lot, Paul. Due to time constraints, I worked around the problem using an operator, but I will definetly look into this code the next time I encounter a similar problem.