We consider a nonlinear two-dimensional boundary value problem which models the frictional contact of a bar with a rigid obstacle. The weak formulation of the problem is in the form of an elliptic variational inequality of the second kind. We establish the existence of a unique weak solution to the problem, then we introduce a regularized version of the variational inequality for which we prove existence, uniqueness and convergence results. We proceed with an optimal control problem for which we prove the existence of an optimal pair. Finally, we consider the corresponding optimal control problem associated to the regularized variational inequality and prove a convergence result.